#218: Fixed webhook and app sdk execution bugs

This commit is contained in:
frikky
2020-12-11 04:22:22 +01:00
parent 035e9d144f
commit dc62016493
6 changed files with 112 additions and 30 deletions
+3 -3
View File
@@ -1383,20 +1383,20 @@ func handleExecution(client *http.Client, req *http.Request, workflowExecution W
// FIXME - clean up stopped (remove) containers with this execution id
newresp, err := client.Do(req)
if err != nil {
log.Printf("Failed making request: %s", err)
log.Printf("[ERROR] Failed making request: %s", err)
time.Sleep(time.Duration(sleepTime) * time.Second)
continue
}
body, err := ioutil.ReadAll(newresp.Body)
if err != nil {
log.Printf("Failed reading body: %s", err)
log.Printf("[ERROR] Failed reading body: %s", err)
time.Sleep(time.Duration(sleepTime) * time.Second)
continue
}
if newresp.StatusCode != 200 {
log.Printf("Err: %s\nStatusCode: %d", string(body), newresp.StatusCode)
log.Printf("[ERROR] Bad statuscode: %s\nStatusCode: %d", string(body), newresp.StatusCode)
time.Sleep(time.Duration(sleepTime) * time.Second)
continue
}