(sessionID)
| 990 | } |
| 991 | |
| 992 | function dueJobs(state, force = false) { |
| 993 | const current = now() |
| 994 | return (state.jobs || []).filter((job) => { |
| 995 | if (isGoalJob(job) && ["completed", "blocked", "cleared"].includes(job.goalStatus)) return false |
| 996 | if (!job.enabled || job.paused) return false |
| 997 | if (job.maxRuns > 0 && (job.runCount || 0) >= job.maxRuns) return false |
| 998 | if (job.maxRuntimeMs > 0 && current - Date.parse(job.createdAt || new Date().toISOString()) >= job.maxRuntimeMs) return true |
| 999 | if (force) return true |
no outgoing calls
no test coverage detected