Fix scheduler timezone: use ZoneInfo(settings.scheduler_timezone) not 'local'
This commit is contained in:
@@ -10,6 +10,7 @@ Set AUTO_DISTILL=false to disable entirely.
|
||||
Set AUTO_DISTILL_LONG=true to enable monthly long-term integration.
|
||||
"""
|
||||
import logging
|
||||
from zoneinfo import ZoneInfo
|
||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||
from config import settings
|
||||
|
||||
@@ -57,7 +58,7 @@ def start() -> None:
|
||||
logger.info("auto distillation disabled (AUTO_DISTILL=false)")
|
||||
return
|
||||
|
||||
_scheduler = AsyncIOScheduler(timezone="local")
|
||||
_scheduler = AsyncIOScheduler(timezone=ZoneInfo(settings.scheduler_timezone))
|
||||
|
||||
if settings.auto_distill_short:
|
||||
_scheduler.add_job(_run_short, "cron", hour=3, minute=0, id="distill_short")
|
||||
|
||||
Reference in New Issue
Block a user