Skip to content

Commit

Permalink
feat (worker): new timeout 120s (#2591)
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 Apr 23, 2018
1 parent 2c8cf79 commit 4a39be9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine/api/workflow/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ func checkNodeRunCondition(wr *sdk.WorkflowRun, node sdk.WorkflowNode, params []
} else {
luacheck, err := luascript.NewCheck()
if err != nil {
log.Warning("processWorkflowNodeRun> WorkflowCheckConditions error: %s", errc)
log.Warning("processWorkflowNodeRun> WorkflowCheckConditions error: %s", err)
AddWorkflowRunInfo(wr, true, sdk.SpawnMsg{
ID: sdk.MsgWorkflowError.ID,
Args: []interface{}{err.Error()},
Expand Down
2 changes: 1 addition & 1 deletion engine/worker/cmd_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func updateCmd(w *currentWorker) func(cmd *cobra.Command, args []string) {
sdk.Exit("--api not provided, aborting update.")
}
w.client = cdsclient.NewWorker(w.apiEndpoint, "download", &http.Client{
Timeout: time.Second * 10,
Timeout: time.Second * 120,
Transport: &httpcontrol.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: FlagBool(cmd, flagInsecure)},
},
Expand Down
2 changes: 1 addition & 1 deletion engine/worker/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func initFlags(cmd *cobra.Command, w *currentWorker) {
w.bookedWJobID = FlagInt64(cmd, flagBookedWorkflowJobID)

w.client = cdsclient.NewWorker(w.apiEndpoint, w.status.Name, &http.Client{
Timeout: time.Second * 10,
Timeout: time.Second * 120,
Transport: &httpcontrol.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: FlagBool(cmd, flagInsecure)},
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/cdsclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewWorker(endpoint string, name string, c HTTPClient) Interface {
cli.config = conf

if c == nil {
cli.HTTPClient = &http.Client{Timeout: time.Second * 10}
cli.HTTPClient = &http.Client{Timeout: time.Second * 120}
} else {
cli.HTTPClient = c
}
Expand Down

0 comments on commit 4a39be9

Please sign in to comment.