fix(FN-1001): fix retry race condition in executor and scheduler
- Executor skips redundant moveTask call on manual retry (was causing race with scheduler) - Scheduler now triggers scheduling on todo column transitions to pick up retried tasks - Add tests for retry race condition fix covering both executor and scheduler paths
This commit is contained in:
@@ -191,11 +191,11 @@ export class Scheduler {
|
||||
void this.handleMissionTaskCompletion(task.id, task.sliceId);
|
||||
}
|
||||
|
||||
// Event-driven scheduling: when a dependency completes (task moves to "done"),
|
||||
// Event-driven scheduling: when a task moves to "done" (completion) or "todo" (retry/manual move),
|
||||
// trigger scheduling immediately so waiting tasks can start without waiting
|
||||
// for the next poll interval (up to 15 seconds).
|
||||
if (to === "done") {
|
||||
schedulerLog.log("Task completed — triggering scheduling");
|
||||
if (to === "done" || to === "todo") {
|
||||
schedulerLog.log(`Task moved to ${to} — triggering scheduling`);
|
||||
this.schedule();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user