From 021b461b0a7db1b8da0e9b5c837c5fb487018020 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 24 Sep 2024 09:54:18 +0200 Subject: [PATCH] test booking --- models/workflow/workflow_mongo_accessor.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 9323710..4484919 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -218,12 +218,6 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet 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, - "state": 1, - }, utils.WORKFLOW_EXECUTION.String()) - wfa.book(id, realData, []*workflow_execution.WorkflowExecution{}) - nats.SetNATSPub(utils.WORKFLOW.String(), tools.REMOVE, realData) return 200, nil } fmt.Println("EXECS", err, len(execs)) @@ -256,7 +250,7 @@ func (wfa *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (util return nil, code, err } if !avoid { // if the schedule is not avoided, update the executions - if code, err := wfa.execution(id, res.(*Workflow), true); code != 200 { + if code, err := wfa.execution(id, res.(*Workflow), false); code != 200 { fmt.Println("TEST", code, err) return nil, code, errors.New("could not update the executions : " + err.Error()) }