Skip to content

Commit 0395d5c

Browse files
Actions FetchTask concurrently picked jobs is an error for the runner
* Before this Gitea claimed no job is available to be picked in this case * The runner had to wait for an external taskversion increment * Now act_runner is notified about an error and retries the request later without updating its taskversion
1 parent 09a3b07 commit 0395d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/actions/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
317317
if n, err := UpdateRunJob(ctx, job, builder.Eq{"task_id": 0}); err != nil {
318318
return nil, false, err
319319
} else if n != 1 {
320-
return nil, false, nil
320+
return nil, false, fmt.Errorf("other runner picked up our job")
321321
}
322322

323323
task.Job = job

0 commit comments

Comments
 (0)