Skip to content

Commit

Permalink
fix(worker): take timeout (#3454)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault authored and fsamin committed Oct 13, 2018
1 parent e66d70c commit 3e16490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/worker/take_workflow_node_run_job.go
Expand Up @@ -19,7 +19,7 @@ import (
// If Take is not possible (as Job already booked for example)
// it will return true (-> can work on another job), false, otherwise
func (w *currentWorker) takeWorkflowJob(ctx context.Context, job sdk.WorkflowNodeJobRun) (bool, error) {
ctxQueueTakeJob, cancelQueueTakeJob := context.WithTimeout(ctx, 5*time.Second)
ctxQueueTakeJob, cancelQueueTakeJob := context.WithTimeout(ctx, 20*time.Second)
defer cancelQueueTakeJob()
info, err := w.client.QueueTakeJob(ctxQueueTakeJob, job, w.bookedWJobID == job.ID)
if err != nil {
Expand Down

0 comments on commit 3e16490

Please sign in to comment.