2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Update message for automatic sleeps

This commit is contained in:
Dan 2022-01-31 20:45:04 +01:00
parent 6f9e77bc2c
commit 3a911956b0

View File

@ -366,7 +366,8 @@ class Session:
if amount > sleep_threshold >= 0:
raise
log.warning(f'[{self.client.session_name}] Sleeping for {amount}s (required by "{query}")')
log.warning(f'[{self.client.session_name}] Waiting for {amount} seconds before continuing '
f'(required by "{query}")')
await asyncio.sleep(amount)
except (OSError, TimeoutError, InternalServerError, ServiceUnavailable) as e: