From a0dd8e1c42f02073ea38f4128f2ad318430ef76d Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 23 Sep 2024 09:45:05 +0200 Subject: [PATCH] debug on exec --- models/workflow/workflow_mongo_accessor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 4d44834..f6e3aff 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -244,14 +244,14 @@ 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(code, err) + fmt.Println("UPDATE", code, err) if code != 200 { 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 { - fmt.Println(code, err) - return nil, code, err + fmt.Println("TEST", code, err) + return nil, code, errors.New("could not update the executions : " + err.Error()) } } wfa.execute(res.(*Workflow), false) // update the workspace for the workflow