test booking
This commit is contained in:
parent
5c9adcf597
commit
021b461b0a
@ -218,12 +218,6 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
|
||||
fmt.Println("BOOKING2", err, delete)
|
||||
|
||||
if delete { // if delete is set to true, delete the executions
|
||||
mongo.MONGOService.DeleteMultiple(map[string]interface{}{
|
||||
"workflow_id": id,
|
||||
"state": 1,
|
||||
}, utils.WORKFLOW_EXECUTION.String())
|
||||
wfa.book(id, realData, []*workflow_execution.WorkflowExecution{})
|
||||
nats.SetNATSPub(utils.WORKFLOW.String(), tools.REMOVE, realData)
|
||||
return 200, nil
|
||||
}
|
||||
fmt.Println("EXECS", err, len(execs))
|
||||
@ -256,7 +250,7 @@ func (wfa *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (util
|
||||
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 {
|
||||
if code, err := wfa.execution(id, res.(*Workflow), false); code != 200 {
|
||||
fmt.Println("TEST", code, err)
|
||||
return nil, code, errors.New("could not update the executions : " + err.Error())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user