summaryrefslogtreecommitdiff
path: root/internal/executor
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor')
-rw-r--r--internal/executor/executor.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/executor/executor.go b/internal/executor/executor.go
index d2b476a..6aef736 100644
--- a/internal/executor/executor.go
+++ b/internal/executor/executor.go
@@ -777,21 +777,21 @@ func (p *Pool) execute(ctx context.Context, t *task.Task) {
if len(t.DependsOn) > 0 {
ready, depErr := p.checkDepsReady(t)
if depErr != nil {
- // A dependency hit a terminal failure — fail this task immediately.
+ // A dependency hit a terminal failure — cancel this task immediately.
now := time.Now().UTC()
exec := &storage.Execution{
ID: uuid.New().String(),
TaskID: t.ID,
StartTime: now,
EndTime: now,
- Status: "FAILED",
+ Status: "CANCELLED",
ErrorMsg: depErr.Error(),
}
if createErr := p.store.CreateExecution(exec); createErr != nil {
p.logger.Error("failed to create execution record", "error", createErr)
}
- if err := p.store.UpdateTaskState(t.ID, task.StateFailed); err != nil {
- p.logger.Error("failed to update task state", "taskID", t.ID, "state", task.StateFailed, "error", err)
+ if err := p.store.UpdateTaskState(t.ID, task.StateCancelled); err != nil {
+ p.logger.Error("failed to update task state", "taskID", t.ID, "state", task.StateCancelled, "error", err)
}
p.resultCh <- &Result{TaskID: t.ID, Execution: exec, Err: depErr}
return