mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-05 10:41:58 +03:00
fix(cron): review follow-ups for system job retirement
- advance the disabled-dream cursor before touching the cron store so the #4242 fix still applies when jobs.json is corrupt - pin the gateway wiring: the disabled-path test now asserts both dream and heartbeat are retired, not just unregistered - cover remove_system_job on a fresh install with no store file
This commit is contained in:
committed by
chengyongru
parent
e5718d4de6
commit
20488a585d
@@ -785,8 +785,10 @@ def _run_gateway(
|
||||
console.print(f"[green]✓[/green] Dream: {dream_cfg.describe_schedule()}")
|
||||
else:
|
||||
console.print("[yellow]○[/yellow] Dream: disabled")
|
||||
cron.remove_system_job("dream")
|
||||
# Advance the cursor first: it must happen unconditionally (issue
|
||||
# #4242), even if the cron store turns out to be corrupt below.
|
||||
_advance_dream_cursor_if_behind(agent.context.memory)
|
||||
cron.remove_system_job("dream")
|
||||
|
||||
# Register Heartbeat system job (idempotent on restart)
|
||||
if hb_cfg.enabled:
|
||||
|
||||
Reference in New Issue
Block a user