Fixed some execution setting bugs

This commit is contained in:
Frikky
2023-11-15 12:58:23 +01:00
parent df6d7f88de
commit c629864c26
4 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -3515,7 +3515,7 @@ class AppBase:
timeout = 30
# Check if current app is Shuffle Tools, then set to 55 due to certain actions being slow (ioc parser..)
#uu In general, this should be disabled for onprem
# In general, this should be disabled for onprem
if self.action["app_name"].lower() == "shuffle tools":
timeout = 55
+1 -1
View File
@@ -1,6 +1,6 @@
module shuffle-shared
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
go 1.19
+11 -2
View File
@@ -1049,15 +1049,25 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
workflowExecution, execInfo, _, err := shuffle.PrepareWorkflowExecution(ctx, workflow, request, 10)
if err != nil {
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
if err != nil {
log.Printf("[ERROR] Failed setting workflow execution during init (2): %s", err)
}
if strings.Contains(fmt.Sprintf("%s", err), "User Input") {
// Special for user input callbacks
return workflowExecution, fmt.Sprintf("%s", err), nil
} else {
log.Printf("[WARNING] Failed in prepareExecution: %s", err)
log.Printf("[ERROR] Failed in prepareExecution: %s", err)
return shuffle.WorkflowExecution{}, fmt.Sprintf("Failed starting workflow: %s", err), err
}
}
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
if err != nil {
log.Printf("[ERROR] Failed setting workflow execution during init (2): %s", err)
}
err = imageCheckBuilder(execInfo.ImageNames)
if err != nil {
log.Printf("[ERROR] Failed building the required images from %#v: %s", execInfo.ImageNames, err)
@@ -1643,7 +1653,6 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
return shuffle.WorkflowExecution{}, "Failed building missing Docker images", err
}
//Org []Org `json:"org,omitempty" datastore:"org"`
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
if err != nil {
log.Printf("[WARNING] Error saving workflow execution for updates %s", err)