summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/hashserv/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/hashserv/client.py')
-rw-r--r--poky/bitbake/lib/hashserv/client.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/poky/bitbake/lib/hashserv/client.py b/poky/bitbake/lib/hashserv/client.py
index b2aa1026ac..f676d267fa 100644
--- a/poky/bitbake/lib/hashserv/client.py
+++ b/poky/bitbake/lib/hashserv/client.py
@@ -83,10 +83,10 @@ class AsyncClient(bb.asyncrpc.AsyncClient):
{"get": {"taskhash": taskhash, "method": method, "all": all_properties}}
)
- async def get_outhash(self, method, outhash, taskhash):
+ async def get_outhash(self, method, outhash, taskhash, with_unihash=True):
await self._set_mode(self.MODE_NORMAL)
return await self.send_message(
- {"get-outhash": {"outhash": outhash, "taskhash": taskhash, "method": method}}
+ {"get-outhash": {"outhash": outhash, "taskhash": taskhash, "method": method, "with_unihash": with_unihash}}
)
async def get_stats(self):
@@ -101,6 +101,14 @@ 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}})
+
+ async def clean_unused(self, max_age):
+ await self._set_mode(self.MODE_NORMAL)
+ return await self.send_message({"clean-unused": {"max_age_seconds": max_age}})
+
class Client(bb.asyncrpc.Client):
def __init__(self):
@@ -115,6 +123,8 @@ class Client(bb.asyncrpc.Client):
"get_stats",
"reset_stats",
"backfill_wait",
+ "remove",
+ "clean_unused",
)
def _get_async_client(self):