(directory, client, sessionID, args)
| 1477 | const state = await readState(directory, sessionID) |
| 1478 | let count = 0 |
| 1479 | state.jobs = (state.jobs || []).map((job, index) => { |
| 1480 | if (!isGoalJob(job) || !matchJob(job, target, index)) return job |
| 1481 | count++ |
| 1482 | return { ...job, paused: false, enabled: true, goalStatus: job.goalStatus === "blocked" ? "active" : (job.goalStatus || "active"), lastRunAt: 0 } |
| 1483 | }) |
| 1484 | await writeState(directory, sessionID, state) |
| 1485 | await toast(client, `Resumed ${count} experimental goal(s).`, count ? "success" : "warning") |
| 1486 | if (count) { |
| 1487 | await scheduleDueWork(directory, client, sessionID) |
| 1488 | scheduleIdleWork(directory, client, sessionID) |
| 1489 | } |
| 1490 | } |
no test coverage detected