aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hashserv/client.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-10-06 09:36:41 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-06 22:44:15 +0100
commit861d068b3a9fb5e91a01dbec54996a5a6f93ef29 (patch)
treee5589a2a2b261475ccb860293c158fb3fafed433 /lib/hashserv/client.py
parent5a1e5b8dc55d6bb4d93bac3492f8c43ff957e712 (diff)
downloadbitbake-861d068b3a9fb5e91a01dbec54996a5a6f93ef29.tar.gz
hashserv: Add remove API
Adds a `remove` API to the client and server that can be used to remove hash equivalence entries that match a particular critera Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/hashserv/client.py')
-rw-r--r--lib/hashserv/client.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hashserv/client.py b/lib/hashserv/client.py
index b2aa1026a..7446e4c9f 100644
--- a/lib/hashserv/client.py
+++ b/lib/hashserv/client.py
@@ -101,6 +101,10 @@ class AsyncClient(bb.asyncrpc.AsyncClient):
await self._set_mode(self.MODE_NORMAL)
return (await self.send_message({"backfill-wait": None}))["tasks"]
+ async def remove(self, where):
+ await self._set_mode(self.MODE_NORMAL)
+ return await self.send_message({"remove": {"where": where}})
+
class Client(bb.asyncrpc.Client):
def __init__(self):
@@ -115,6 +119,7 @@ class Client(bb.asyncrpc.Client):
"get_stats",
"reset_stats",
"backfill_wait",
+ "remove",
)
def _get_async_client(self):