Skip to content

Commit

Permalink
Worker: do not report the task as failed if it's context was canceled (
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev authored Sep 29, 2023
1 parent fec8242 commit 884ca5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/worker/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (worker *Worker) runTask(

err := inst.Run(taskCtx, &config)

if err != nil && !errors.Is(err, context.Canceled) {
if err != nil && !errors.Is(err, context.Canceled) && !errors.Is(taskCtx.Err(), context.Canceled) {
worker.logger.Errorf("failed to run task %d: %v", agentAwareTask.TaskId, err)

boundedCtx, cancel := context.WithTimeout(context.Background(), perCallTimeout)
Expand Down

0 comments on commit 884ca5c

Please # to comment.