test booking
This commit is contained in:
parent
92bb274d03
commit
5c9adcf597
@ -215,6 +215,8 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
|
||||
if err != nil {
|
||||
return 409, err // if the booking fails, return an error for integrity between peers
|
||||
}
|
||||
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,
|
||||
@ -224,9 +226,11 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
|
||||
nats.SetNATSPub(utils.WORKFLOW.String(), tools.REMOVE, realData)
|
||||
return 200, nil
|
||||
}
|
||||
fmt.Println("EXECS", err, len(execs))
|
||||
if len(execs) > 0 { // if the executions are set, store them
|
||||
for _, obj := range execs {
|
||||
_, code, err := accessor.StoreOne(obj)
|
||||
fmt.Println("EXECS LOOP", err, code)
|
||||
if code != 200 {
|
||||
return code, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user