mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-01 16:51:53 +03:00
fix(cron): retire persisted heartbeat/dream jobs when disabled
Disabling gateway.heartbeat (or agents.defaults.dream) only skipped job registration on startup; the previously persisted system job in <workspace>/cron/jobs.json kept firing, and remove_job refuses to touch protected system jobs. Add CronService.remove_system_job for startup reconciliation and call it from the gateway disabled branches so the config toggle takes effect after restart.
This commit is contained in:
committed by
chengyongru
parent
1fe36d5dec
commit
e5718d4de6
@@ -211,6 +211,7 @@ def test_load_store_falls_back_to_in_memory_on_corruption_after_start(
|
||||
("enable_job", lambda service: service.enable_job("missing", enabled=False)),
|
||||
("update_job", lambda service: service.update_job("missing", name="new name")),
|
||||
("register_system_job", lambda service: service.register_system_job(_system_job())),
|
||||
("remove_system_job", lambda service: service.remove_system_job("heartbeat")),
|
||||
],
|
||||
)
|
||||
def test_public_apis_raise_clear_error_for_unavailable_corrupt_store(
|
||||
|
||||
Reference in New Issue
Block a user