From d15fdac27bde7dfc74abae46287553ef7ed382e6 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 23 Jan 2025 10:49:50 +0100 Subject: [PATCH] light modification --- .../workflow_execution/workflow_execution_mongo_accessor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/workflow_execution/workflow_execution_mongo_accessor.go b/models/workflow_execution/workflow_execution_mongo_accessor.go index 64dfed1..8ccb546 100644 --- a/models/workflow_execution/workflow_execution_mongo_accessor.go +++ b/models/workflow_execution/workflow_execution_mongo_accessor.go @@ -2,6 +2,7 @@ package workflow_execution import ( "errors" + "fmt" "time" "cloud.o-forge.io/core/oc-lib/dbs" @@ -78,13 +79,14 @@ func (a *workflowExecutionMongoAccessor) Search(filters *dbs.Filters, search str func (a *workflowExecutionMongoAccessor) getExec() func(utils.DBObject) utils.ShallowDBObject { return func(d utils.DBObject) utils.ShallowDBObject { + fmt.Println("getExec", d) if d.(*WorkflowExecutions).State == enum.DRAFT && time.Now().UTC().After(d.(*WorkflowExecutions).ExecDate) { utils.GenericDeleteOne(d.GetID(), newShallowAccessor(a.Request)) return nil } if d.(*WorkflowExecutions).State == enum.SCHEDULED && time.Now().UTC().After(d.(*WorkflowExecutions).ExecDate) { d.(*WorkflowExecutions).State = enum.FORGOTTEN - d, _, _ = utils.GenericRawUpdateOne(d, d.GetID(), newShallowAccessor(a.Request)) + utils.GenericRawUpdateOne(d, d.GetID(), newShallowAccessor(a.Request)) return d } return d