From 2493d41271455cf697881578971c040ca13b35c2 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Wed, 20 Mar 2024 23:27:09 +0300 Subject: [PATCH] update the format for the workers output. --- app/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 7c595f77..9c8066e5 100644 --- a/app/main.py +++ b/app/main.py @@ -364,7 +364,11 @@ class Main: def default(o): return f"<>" return json.dumps(obj, default=default) - return web.Response(text=safe_serialize(data), headers={ + return web.Response(text=safe_serialize({ + 'open': self.queue.pool.has_open_workers(), + 'count': self.queue.pool.get_available_workers(), + 'workers': data, + }), headers={ 'Content-Type': 'application/json', })