mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-09 04:40:48 +08:00
Add cron_retrigger for consumed one-shot jobs.
Resume only unpauses; listeners need a native way to re-fire the same job id with a new run without creating duplicate executors. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
6724332114
commit
c11221606a
9 changed files with 324 additions and 7 deletions
|
|
@ -10,6 +10,7 @@ import { appendRun, getJob, patchRun, upsertJob } from './store.js'
|
|||
import { ACTIVE_RUN_STATUSES } from './fire-status.js'
|
||||
import {
|
||||
findLabelOverlapRun,
|
||||
isRetriggerable,
|
||||
normalizeLabels,
|
||||
projectJobState,
|
||||
} from './monitor.js'
|
||||
|
|
@ -127,6 +128,7 @@ export function publicJob(job, runs = null) {
|
|||
state: stateInfo.state,
|
||||
stateEnteredAt: stateInfo.stateEnteredAt,
|
||||
stuck: stateInfo.stuck === true,
|
||||
retriggerable: isRetriggerable(job, jobRuns || []),
|
||||
...job.origin ? { origin: job.origin } : {},
|
||||
schedule: job.schedule,
|
||||
createdAt: job.createdAt,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue