Skip to content

Commit

Permalink
fix task cancellation status bug
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Dec 18, 2024
1 parent 79d0373 commit a28b24e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/abstractions/taskqueue/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ func (t *TaskQueueTask) Cancel(ctx context.Context, reason types.TaskCancellatio
return err
}

// Don't update tasks that are already in a terminal state
if task.Status.IsCompleted() {
return nil
}

switch reason {
case types.TaskExpired:
task.Status = types.TaskStatusExpired
Expand Down

0 comments on commit a28b24e

Please sign in to comment.