From 4e914d0e2a242492465225c2259319d610fc8e59 Mon Sep 17 00:00:00 2001 From: "xinnan.hou" Date: Tue, 7 Apr 2026 16:58:21 +0800 Subject: [PATCH] fix not reload job config --- nanobot/cron/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nanobot/cron/service.py b/nanobot/cron/service.py index d60846640..42b0e097e 100644 --- a/nanobot/cron/service.py +++ b/nanobot/cron/service.py @@ -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