fix(cron): defer timer rearming while jobs execute

This commit is contained in:
Kuang-xianxin authored and chengyongru committed 2026-09-14 17:48:10 +08:00
1 parent 93b51121d1
commit 02ca8f6558
2 files changed
+93

No files matched your search

+5
View File
@@ -519,6 +519,11 @@ class CronService:
def _arm_timer(self) -> None:
"""Schedule the next timer tick."""
# The timer task also owns the agent callback. Store edits during a
# callback must not cancel it or start another tick for the same due
# job. The final execution rearms after persisting its result.
if self._active_executions:
return
if self._timer_task:
self._timer_task.cancel()