From 568fddef9949e10af45b90e1520a2515958384c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pol=C3=A1=C4=8Dek?= Date: Thu, 23 May 2024 22:14:51 +0200 Subject: [PATCH] Sleep longer in RocClient.loop() --- python/yaroc/clients/roc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/yaroc/clients/roc.py b/python/yaroc/clients/roc.py index a280a84..390e839 100644 --- a/python/yaroc/clients/roc.py +++ b/python/yaroc/clients/roc.py @@ -20,13 +20,13 @@ class RocClient(Client): """Class for sending punches to ROC""" async def loop(self): - session = aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=20)) + session = aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=50)) retry_options = ExponentialRetry(attempts=5, start_timeout=3) self.client = RetryClient( client_session=session, raise_for_status=True, retry_options=retry_options ) async with self.client: - await asyncio.sleep(1000000) + await asyncio.sleep(10000000) # We need to sleep, otherwise the client will be GC-ed async def send_punch( self,