1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

bitbake: hashserv: Add db-usage API

Adds an API to query the server for the usage of the database (e.g. how
many rows are present in each table)

(Bitbake rev: c9c1224447e147e0de92953bc85cea75670b898c)

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-11-03 08:26:33 -06:00
committed by Richard Purdie
parent 8cfb94c06c
commit 3a2c5a6fa2
6 changed files with 86 additions and 0 deletions
+5
View File
@@ -186,6 +186,10 @@ class AsyncClient(bb.asyncrpc.AsyncClient):
self.saved_become_user = username
return result
async def get_db_usage(self):
await self._set_mode(self.MODE_NORMAL)
return (await self.invoke({"get-db-usage": {}}))["usage"]
class Client(bb.asyncrpc.Client):
def __init__(self, username=None, password=None):
@@ -214,6 +218,7 @@ class Client(bb.asyncrpc.Client):
"new_user",
"delete_user",
"become_user",
"get_db_usage",
)
def _get_async_client(self):