mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Add cron
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
from arq.cron import cron
|
||||||
|
|
||||||
from app.services.cache_updater import (
|
from app.services.cache_updater import (
|
||||||
check_books,
|
check_books,
|
||||||
cache_file_by_book_id,
|
cache_file_by_book_id,
|
||||||
@@ -24,5 +26,8 @@ class WorkerSettings:
|
|||||||
on_startup = startup
|
on_startup = startup
|
||||||
on_shutdown = shutdown
|
on_shutdown = shutdown
|
||||||
redis_settings = get_redis_settings()
|
redis_settings = get_redis_settings()
|
||||||
max_jobs = 2
|
max_jobs = 1
|
||||||
job_timeout = 3 * 60
|
job_timeout = 3 * 60
|
||||||
|
cron_jobs = [
|
||||||
|
cron("check_books", hour={7}, minute=0)
|
||||||
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user