1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

bitbake: hashserv: Add API to clean unused entries

Adds an API to remove unused entries in the outhash database based on
age and if they are referenced by any unihash

(Bitbake rev: a169ac523d166c6cbba918b152a76782176c3e88)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2023-10-06 09:36:44 -06:00
committed by Richard Purdie
parent cc218dd108
commit b026e816f7
3 changed files with 43 additions and 1 deletions
+5
View File
@@ -105,6 +105,10 @@ class AsyncClient(bb.asyncrpc.AsyncClient):
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):
@@ -120,6 +124,7 @@ class Client(bb.asyncrpc.Client):
"reset_stats",
"backfill_wait",
"remove",
"clean_unused",
)
def _get_async_client(self):