From 851cfd457ec6f1922ade30672beb2b8713f9dc19 Mon Sep 17 00:00:00 2001 From: khushal Date: Sat, 18 Jan 2025 14:02:52 +0530 Subject: [PATCH] (20250118) Extended the time between mail sync batch generation. --- cron/message/mail/auto_sync.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cron/message/mail/auto_sync.py b/cron/message/mail/auto_sync.py index 52bb087..1bfe18f 100644 --- a/cron/message/mail/auto_sync.py +++ b/cron/message/mail/auto_sync.py @@ -401,8 +401,9 @@ async def sync_accounts(batch_size: int) -> None: results = await asyncio.gather(*tasks) # Small delay to not overload the database: - if len(auth_tokens_batch) == 0: await asyncio.sleep(4.0 + (random.random() * 2.0)) - else: await asyncio.sleep(1.0 + (random.random() * 2.0)) + await asyncio.sleep(100.0 + (random.random() * 20.0)) + # if len(auth_tokens_batch) == 0: await asyncio.sleep(4.0 + (random.random() * 2.0)) + # else: await asyncio.sleep(1.0 + (random.random() * 2.0)) # *****************************************************************************************************************