aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hashserv/client.py
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-02-05 11:26:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-09 15:59:44 +0000
commitdc19606ada29a4d8afde4fcecd8ec986b47b867e (patch)
tree634776c105fea5acd63d42e92de0626762f9600e /lib/hashserv/client.py
parent2be4f7f0d2ccb09917398289e8140e1467e84bb2 (diff)
downloadbitbake-dc19606ada29a4d8afde4fcecd8ec986b47b867e.tar.gz
hashserv: Add get-outhash message
The get-outhash message can be sent via the get_outhash client method. This works in a similar way to the get message but looks up a db entry by outhash rather than by taskhash. It is intended to be used as a read-only form of the report message. As both handle_get_outhash and handle_report use the same query string we can factor this out. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/hashserv/client.py')
-rw-r--r--lib/hashserv/client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/hashserv/client.py b/lib/hashserv/client.py
index 0b7f4e42e..e05c1eb56 100644
--- a/lib/hashserv/client.py
+++ b/lib/hashserv/client.py
@@ -170,6 +170,12 @@ class AsyncClient(object):
{"get": {"taskhash": taskhash, "method": method, "all": all_properties}}
)
+ async def get_outhash(self, method, outhash, taskhash):
+ await self._set_mode(self.MODE_NORMAL)
+ return await self.send_message(
+ {"get-outhash": {"outhash": outhash, "taskhash": taskhash, "method": method}}
+ )
+
async def get_stats(self):
await self._set_mode(self.MODE_NORMAL)
return await self.send_message({"get-stats": None})