* Add a fresh task to the in-memory store and, when persistence is * attached, mirror the new record to ` /cron/ .json`. * * The store call is synchronous (CronCreate needs the id for its * response); the on-disk write is fire-and-forget so a slow disk * never blocks the
(init: SessionCronTaskInit)
| 196 | * the agent loop. |
| 197 | */ |
| 198 | addTask(init: SessionCronTaskInit): CronTask { |
| 199 | const task = this.store.add(init, this.clocks.wallNow()); |
| 200 | this.persistEnqueue(task.id, () => |
| 201 | this.persistStore!.write(task.id, task), |
| 202 | ); |
| 203 | return task; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Remove a batch of tasks from the in-memory store and mirror each |
no test coverage detected