weitongtong e0ba568089 fix(cron): 修复固定间隔任务因 store 并发替换导致的重复执行
_on_timer 中 await _execute_job 让出控制权期间,前端轮询触发的
list_jobs 调用 _load_store 从磁盘重新加载覆盖 self._store,
已执行任务的状态被旧值回退,导致再次触发。
引入 _timer_active 标志位,在任务执行期间阻止并发 _load_store
替换 store。同时修复 store 为空时未重新 arm timer 的问题。

Made-with: Cursor
2026-04-11 16:15:01 +08:00
..
2026-02-01 07:36:42 +00:00