From 6a92cf9ec9b5b66e4d8f75eca94988367246e6bf Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Mon, 27 Jan 2025 21:23:57 +0300 Subject: [PATCH] added timeout param for wait_for --- app/library/HttpAPI.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/library/HttpAPI.py b/app/library/HttpAPI.py index 4241225a..2f6dfc75 100644 --- a/app/library/HttpAPI.py +++ b/app/library/HttpAPI.py @@ -438,7 +438,10 @@ class HttpAPI(common): return web.json_response(data={"error": str(e), "data": item}, status=web.HTTPBadRequest.status_code) return web.json_response( - data=await asyncio.wait_for(asyncio.gather(*[self.add(**self.format_item(item)) for item in data])), + data=await asyncio.wait_for( + fut=asyncio.gather(*[self.add(**self.format_item(item)) for item in data]), + timeout=None, + ), status=web.HTTPOk.status_code, dumps=self.encoder.encode, )