Added basic debug view

This commit is contained in:
frikky
2020-05-15 12:50:07 +02:00
parent 3a87451beb
commit 9c4527d30a
6 changed files with 110 additions and 31 deletions
+5
View File
@@ -777,16 +777,21 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
//log.Printf("Checking results %d vs %d", len(workflowExecution.Results), len(workflowExecution.Workflow.Actions)+extraInputs)
if len(workflowExecution.Results) == len(workflowExecution.Workflow.Actions)+extraInputs {
finished := true
lastResult := ""
for _, result := range workflowExecution.Results {
if result.Status != "SUCCESS" && result.Status != "FINISHED" {
finished = false
break
}
lastResult = result.Result
}
if finished {
log.Printf("Execution of %s finished.", workflowExecution.ExecutionId)
//log.Println("Might be finished based on length of results and everything being SUCCESS or FINISHED - VERIFY THIS. Setting status to finished.")
workflowExecution.Result = lastResult
workflowExecution.Status = "FINISHED"
workflowExecution.CompletedAt = int64(time.Now().Unix())
if workflowExecution.LastNode == "" {