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