From 92bb274d03ffd90eef75e0ea8d73bc878d63f9dd Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 24 Sep 2024 09:14:56 +0200 Subject: [PATCH] test booking --- models/workflow/workflow_mongo_accessor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 7e139cf..8ed9591 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -206,10 +206,12 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet } accessor := (&workflow_execution.WorkflowExecution{}).GetAccessor(nil) execs, err := wfa.getExecutions(id, realData) // get the executions of the workflow + fmt.Println("EXECUTIONS", execs) if err != nil { return 422, err } err = wfa.book(id, realData, execs) // book the workflow on the peers + fmt.Println("BOOKING", err) if err != nil { return 409, err // if the booking fails, return an error for integrity between peers } @@ -245,7 +247,7 @@ func (wfa *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (util // avoid the update if the schedule is the same avoid := set.(*Workflow).Schedule == nil || (res.(*Workflow).Schedule != nil && res.(*Workflow).ScheduleActive == set.(*Workflow).ScheduleActive && res.(*Workflow).Schedule.Start == set.(*Workflow).Schedule.Start && res.(*Workflow).Schedule.End == set.(*Workflow).Schedule.End && res.(*Workflow).Schedule.Cron == set.(*Workflow).Schedule.Cron) res, code, err = wfa.GenericUpdateOne(set, id, wfa, &Workflow{}) - fmt.Println("UPDATE", code, err) + fmt.Println("UPDATE", code, err, avoid) if code != 200 { return nil, code, err }