Skip to content

Commit

Permalink
fix(worker): adjust timeout on send step result (#3415)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesnault authored Oct 8, 2018
1 parent ec92876 commit 28fdc63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion engine/worker/cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ func runCmd(w *currentWorker) func(cmd *cobra.Command, args []string) {
errs <- err
}
}
cancel()
nbErrors = 0
case <-registerTick.C:
if err := w.doRegister(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion engine/worker/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (w *currentWorker) updateStepStatus(ctx context.Context, buildID int64, ste

for try := 1; try <= 10; try++ {
log.Info("updateStepStatus> Sending step status %s buildID:%d stepOrder:%d", status, buildID, stepOrder)
ctxt, cancel := context.WithTimeout(ctx, 10*time.Second)
ctxt, cancel := context.WithTimeout(ctx, 120*time.Second)
code, lasterr := w.client.(cdsclient.Raw).PostJSON(ctxt, path, step, nil)
if lasterr == nil && code < 300 {
log.Info("updateStepStatus> Sending step status %s buildID:%d stepOrder:%d OK", status, buildID, stepOrder)
Expand Down

0 comments on commit 28fdc63

Please sign in to comment.