mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-09 19:40:47 +08:00
Fix cron cwd for super_admin and harden IM channel job isolation.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b35bfde557
commit
b1bb0067a0
16 changed files with 714 additions and 49 deletions
15
lib/fire.js
15
lib/fire.js
|
|
@ -108,9 +108,18 @@ export function claimOccurrence(state, jobId, now, trigger, policies) {
|
|||
if (decision.action === 'skip') {
|
||||
run.status = 'skipped'
|
||||
run.reason = decision.reason
|
||||
run.summary = decision.reason === 'overlap'
|
||||
? 'Skipped because a run is already queued or running'
|
||||
: 'Skipped missed occurrence after host downtime (no backlog)'
|
||||
const oneshot = job.schedule?.kind === 'at'
|
||||
if (decision.reason === 'overlap') {
|
||||
run.summary = 'Skipped because a run is already queued or running'
|
||||
} else if (decision.reason === 'misfire' && oneshot) {
|
||||
run.summary = 'Skipped: one-shot time missed (host downtime or delayed tick; no backlog). nextRunAt cleared.'
|
||||
run.error = 'misfire:one-shot'
|
||||
} else if (decision.reason === 'misfire') {
|
||||
run.summary = 'Skipped missed occurrence after host downtime (no backlog)'
|
||||
run.error = 'misfire'
|
||||
} else {
|
||||
run.summary = `Skipped (${decision.reason || 'policy'})`
|
||||
}
|
||||
const alreadySkipped = runs.some((row) => (
|
||||
row
|
||||
&& row.status === 'skipped'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue