From 5c9adcf597442b755e470d94474cfe6a558e84cd Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 24 Sep 2024 09:29:59 +0200 Subject: [PATCH] test booking --- models/workflow/workflow_mongo_accessor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 8ed9591..9323710 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -215,6 +215,8 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet if err != nil { return 409, err // if the booking fails, return an error for integrity between peers } + fmt.Println("BOOKING2", err, delete) + if delete { // if delete is set to true, delete the executions mongo.MONGOService.DeleteMultiple(map[string]interface{}{ "workflow_id": id, @@ -224,9 +226,11 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet nats.SetNATSPub(utils.WORKFLOW.String(), tools.REMOVE, realData) return 200, nil } + fmt.Println("EXECS", err, len(execs)) if len(execs) > 0 { // if the executions are set, store them for _, obj := range execs { _, code, err := accessor.StoreOne(obj) + fmt.Println("EXECS LOOP", err, code) if code != 200 { return code, err }