diff --git a/background/tasks.py b/background/tasks.py index 28c827a..ad08759 100644 --- a/background/tasks.py +++ b/background/tasks.py @@ -12,7 +12,7 @@ from database import Marketplace, Company from utils import chunk_list SMALL_TIMEOUT = 100 -LARGE_TIMEOUT = 500 +LARGE_TIMEOUT = 15 * 60 @taskiq_broker.task(task_name='process_update', timeout=SMALL_TIMEOUT) @@ -62,7 +62,7 @@ async def flush_buffer(): logging.error(f'Error in flush_buffer: {e}') -@taskiq_broker.task(schedule=[{"cron": "0 */3 * * *"}], timeout=LARGE_TIMEOUT) +@taskiq_broker.task(schedule=[{"cron": "*/15 * * * *"}], timeout=LARGE_TIMEOUT) async def reset_companies_with_zero_balance(): logging.info(f'Flushing zero balance companies') async for session in get_session():