* Forget a previously-spawned task so the main loop will retry it next cycle. * Called by callers that detected the spawn channel was unavailable (e.g. * wrapper not attached) so we do not burn the cooldown on a no-op spawn.
(taskId)
| 214 | * wrapper not attached) so we do not burn the cooldown on a no-op spawn. |
| 215 | */ |
| 216 | function forget(taskId) { |
| 217 | if (!taskId) return; |
| 218 | const ledger = _readLedger(); |
| 219 | if (ledger.spawned && ledger.spawned[taskId]) { |
| 220 | delete ledger.spawned[taskId]; |
| 221 | _writeLedger(ledger); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | module.exports = { |
| 226 | pickOne, |
nothing calls this directly
no test coverage detected