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:44 +0100 |
commit | b026e816f710170138fa23c9cbc8aa8c1a882647 (patch) | |
tree | 1e0ad22d1d94e6c01e2168471e72dc466bd7e807 /bitbake/lib/hashserv/client.py | |
parent | cc218dd1080b4df151e90c6e4a0c3d664e1aeee2 (diff) | |
download | poky-b026e816f710170138fa23c9cbc8aa8c1a882647.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/hashserv/client.py')
-rw-r--r-- | bitbake/lib/hashserv/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/hashserv/client.py b/bitbake/lib/hashserv/client.py index eeafeabda0..f676d267fa 100644 --- a/bitbake/lib/hashserv/client.py +++ b/bitbake/lib/hashserv/client.py | |||
@@ -105,6 +105,10 @@ class AsyncClient(bb.asyncrpc.AsyncClient): | |||
105 | await self._set_mode(self.MODE_NORMAL) | 105 | await self._set_mode(self.MODE_NORMAL) |
106 | return await self.send_message({"remove": {"where": where}}) | 106 | return await self.send_message({"remove": {"where": where}}) |
107 | 107 | ||
108 | async def clean_unused(self, max_age): | ||
109 | await self._set_mode(self.MODE_NORMAL) | ||
110 | return await self.send_message({"clean-unused": {"max_age_seconds": max_age}}) | ||
111 | |||
108 | 112 | ||
109 | class Client(bb.asyncrpc.Client): | 113 | class Client(bb.asyncrpc.Client): |
110 | def __init__(self): | 114 | def __init__(self): |
@@ -120,6 +124,7 @@ class Client(bb.asyncrpc.Client): | |||
120 | "reset_stats", | 124 | "reset_stats", |
121 | "backfill_wait", | 125 | "backfill_wait", |
122 | "remove", | 126 | "remove", |
127 | "clean_unused", | ||
123 | ) | 128 | ) |
124 | 129 | ||
125 | def _get_async_client(self): | 130 | def _get_async_client(self): |