Fixed minor backend return bug and JSON in frontend

This commit is contained in:
frikky
2020-10-23 02:06:48 +02:00
parent 1ee57eed69
commit 51fb7becb5
7 changed files with 128 additions and 62 deletions
+8 -7
View File
@@ -694,15 +694,16 @@ func handleExecution(client *http.Client, req *http.Request, workflowExecution W
// FIXME: Force killing a worker should result in a notification somewhere
if len(nextActions) == 0 {
log.Printf("No next action. Finished? Result vs Actions: %d - %d", len(workflowExecution.Results), len(workflowExecution.Workflow.Actions))
//exit := true
//for _, item := range workflowExecution.Results {
// if item == "EXECUTING" {
// exit = false
// break
// }
//}
exit := true
for _, item := range workflowExecution.Results {
if item.Status == "EXECUTING" {
exit = false
break
}
}
if exit && len(workflowExecution.Results) == len(workflowExecution.Workflow.Actions) {
log.Printf("Shutting down.")
shutdown(workflowExecution.ExecutionId, workflowExecution.Workflow.ID)
}