diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-10-06 09:36:44 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-09 15:48:22 +0100 |
commit | a169ac523d166c6cbba918b152a76782176c3e88 (patch) | |
tree | fe0ad0274601e049352f350d8ee169ceb7c1d269 /lib/hashserv/client.py | |
parent | b8d6abfeb4a0765727a62b3d8d83276335c7c7d6 (diff) | |
download | bitbake-a169ac523d166c6cbba918b152a76782176c3e88.tar.gz |
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
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.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hashserv/client.py b/lib/hashserv/client.py index eeafeabda..f676d267f 100644 --- a/lib/hashserv/client.py +++ b/lib/hashserv/client.py @@ -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): |