From 3dac3212058a22c7c9aca5776b0dc32ae291f645 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Sat, 12 Mar 2022 21:39:58 +0300 Subject: [PATCH] Add cron --- src/core/setup_arq.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/setup_arq.py b/src/core/setup_arq.py index 450d509..9e1c1af 100644 --- a/src/core/setup_arq.py +++ b/src/core/setup_arq.py @@ -1,3 +1,5 @@ +from arq.cron import cron + from app.services import update, update_books, update_authors, update_sequences from core.arq_pool import get_redis_settings, get_arq_pool @@ -12,3 +14,6 @@ class WorkerSettings: redis_settings = get_redis_settings() max_jobs = 3 job_timeout = 15 * 60 + cron_jobs = [ + cron("update", hour={6}, minute=0) + ]