1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 15:29:36 +02:00

Fix scheduler

This commit is contained in:
Sean Morley 2024-08-21 10:00:58 -04:00
parent 4241a1024e
commit 91ef71da7a
4 changed files with 37 additions and 9 deletions

View file

@ -1,5 +1,3 @@
# scheduler.py
import logging
from apscheduler.schedulers.background import BackgroundScheduler
from django_apscheduler.jobstores import DjangoJobStore
@ -25,12 +23,11 @@ def start_scheduler():
scheduler.add_job(
run_worldtravel_seed,
trigger="interval",
hours=24,
minutes=3,
id="worldtravel_seed",
max_instances=1,
replace_existing=True,
)
logger.info("Starting scheduler...")
scheduler.start()
return scheduler
scheduler.start()