mirror of
https://github.com/flibusta-apps/library_updater.git
synced 2025-12-06 07:45:35 +01:00
Add cron
This commit is contained in:
@@ -762,7 +762,7 @@ class FlUpdater:
|
||||
return True
|
||||
|
||||
|
||||
async def run_fl_update(ctx) -> bool:
|
||||
async def run_fl_update(ctx: dict, *args, **kwargs) -> bool:
|
||||
return await FlUpdater()._import(ctx)
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from arq.cron import cron
|
||||
|
||||
from app.services.updaters.fl_updater import run_fl_update, run_fl_update2
|
||||
from core.arq_pool import get_redis_settings, get_arq_pool
|
||||
|
||||
@@ -12,3 +14,6 @@ class WorkerSettings:
|
||||
redis_settings = get_redis_settings()
|
||||
max_jobs = 1
|
||||
job_timeout = 30 * 60
|
||||
cron_jobs = [
|
||||
cron(run_fl_update, hour={5}, minute=0)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user