implement
This commit is contained in:
@@ -24,7 +24,7 @@ func newShallowAccessor(request *tools.APIRequest) *WorkflowExecutionMongoAccess
|
|||||||
Request: request,
|
Request: request,
|
||||||
Type: tools.WORKFLOW_EXECUTION,
|
Type: tools.WORKFLOW_EXECUTION,
|
||||||
New: func() *WorkflowExecution { return &WorkflowExecution{} },
|
New: func() *WorkflowExecution { return &WorkflowExecution{} },
|
||||||
NotImplemented: []string{"DeleteOne", "StoreOne", "CopyOne"},
|
NotImplemented: []string{"CopyOne"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ func NewAccessor(request *tools.APIRequest) *WorkflowExecutionMongoAccessor {
|
|||||||
Request: request,
|
Request: request,
|
||||||
Type: tools.WORKFLOW_EXECUTION,
|
Type: tools.WORKFLOW_EXECUTION,
|
||||||
New: func() *WorkflowExecution { return &WorkflowExecution{} },
|
New: func() *WorkflowExecution { return &WorkflowExecution{} },
|
||||||
NotImplemented: []string{"DeleteOne", "StoreOne", "CopyOne"},
|
NotImplemented: []string{"CopyOne"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ func (wfa *WorkflowExecutionMongoAccessor) UpdateOne(set map[string]interface{},
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *WorkflowExecutionMongoAccessor) LoadOne(id string) (utils.DBObject, int, error) {
|
func (a *WorkflowExecutionMongoAccessor) LoadOne(id string) (utils.DBObject, int, error) {
|
||||||
return utils.GenericLoadOne[*WorkflowExecution](id, a.New(), func(d utils.DBObject) (utils.DBObject, int, error) {
|
return utils.GenericLoadOne(id, a.New(), func(d utils.DBObject) (utils.DBObject, int, error) {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
now = now.Add(time.Second * -60)
|
now = now.Add(time.Second * -60)
|
||||||
if d.(*WorkflowExecution).State == enum.DRAFT && !a.shallow && now.UTC().After(d.(*WorkflowExecution).ExecDate) {
|
if d.(*WorkflowExecution).State == enum.DRAFT && !a.shallow && now.UTC().After(d.(*WorkflowExecution).ExecDate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user