Skip to content

Commit

Permalink
Sleep longer in RocClient.loop()
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed May 23, 2024
1 parent 44cd613 commit 568fdde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/yaroc/clients/roc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 568fdde

Please sign in to comment.