fix not reload job config

This commit is contained in:
xinnan.hou 2026-04-07 16:58:21 +08:00 committed by Xubin Ren
parent b4f985f3dc
commit 4e914d0e2a

View File

@ -84,6 +84,7 @@ class CronService:
if mtime != self._last_mtime:
logger.info("Cron: jobs.json modified externally, reloading")
self._store = None
self._last_mtime = mtime
if self._store:
return self._store
@ -190,8 +191,7 @@ class CronService:
}
self.store_path.write_text(json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8")
self._last_mtime = self.store_path.stat().st_mtime
async def start(self) -> None:
"""Start the cron service."""
self._running = True