fix(cli): read terminal state from the normalised job in console cron run
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
Docs Search Monitor / probe (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
Catalog core imports index / refresh (push) Has been cancelled
Canary Release / Tag, draft, and start the canary build (push) Has been cancelled
Canary Release / Prune canaries older than 14 days (push) Has been cancelled
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
Docs Search Monitor / probe (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
Catalog core imports index / refresh (push) Has been cancelled
Canary Release / Tag, draft, and start the canary build (push) Has been cancelled
Canary Release / Prune canaries older than 14 days (push) Has been cancelled
A malformed stored state (e.g. a list) made is_terminal_job raise TypeError on the raw record; the normalised view coerces it.
This commit is contained in:
@@ -812,7 +812,7 @@ def _cron_run(_engine: HermesConsoleEngine, args: list[str]) -> str:
|
||||
with _jobs_lock():
|
||||
job = resolve_job_ref(ref)
|
||||
stored = job and next((j for j in load_jobs() if j.get("id") == job["id"]), job)
|
||||
if stored and not is_terminal_job(stored) and not is_job_runnable(stored):
|
||||
if stored and not is_terminal_job(job) and not is_job_runnable(stored):
|
||||
raise ConsoleCommandError(NOT_RUNNABLE_ERROR)
|
||||
return trigger_job(ref)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user