test booking
This commit is contained in:
parent
95a4acff36
commit
92bb274d03
@ -206,10 +206,12 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
|
|||||||
}
|
}
|
||||||
accessor := (&workflow_execution.WorkflowExecution{}).GetAccessor(nil)
|
accessor := (&workflow_execution.WorkflowExecution{}).GetAccessor(nil)
|
||||||
execs, err := wfa.getExecutions(id, realData) // get the executions of the workflow
|
execs, err := wfa.getExecutions(id, realData) // get the executions of the workflow
|
||||||
|
fmt.Println("EXECUTIONS", execs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 422, err
|
return 422, err
|
||||||
}
|
}
|
||||||
err = wfa.book(id, realData, execs) // book the workflow on the peers
|
err = wfa.book(id, realData, execs) // book the workflow on the peers
|
||||||
|
fmt.Println("BOOKING", err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 409, err // if the booking fails, return an error for integrity between peers
|
return 409, err // if the booking fails, return an error for integrity between peers
|
||||||
}
|
}
|
||||||
@ -245,7 +247,7 @@ func (wfa *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (util
|
|||||||
// avoid the update if the schedule is the same
|
// avoid the update if the schedule is the same
|
||||||
avoid := set.(*Workflow).Schedule == nil || (res.(*Workflow).Schedule != nil && res.(*Workflow).ScheduleActive == set.(*Workflow).ScheduleActive && res.(*Workflow).Schedule.Start == set.(*Workflow).Schedule.Start && res.(*Workflow).Schedule.End == set.(*Workflow).Schedule.End && res.(*Workflow).Schedule.Cron == set.(*Workflow).Schedule.Cron)
|
avoid := set.(*Workflow).Schedule == nil || (res.(*Workflow).Schedule != nil && res.(*Workflow).ScheduleActive == set.(*Workflow).ScheduleActive && res.(*Workflow).Schedule.Start == set.(*Workflow).Schedule.Start && res.(*Workflow).Schedule.End == set.(*Workflow).Schedule.End && res.(*Workflow).Schedule.Cron == set.(*Workflow).Schedule.Cron)
|
||||||
res, code, err = wfa.GenericUpdateOne(set, id, wfa, &Workflow{})
|
res, code, err = wfa.GenericUpdateOne(set, id, wfa, &Workflow{})
|
||||||
fmt.Println("UPDATE", code, err)
|
fmt.Println("UPDATE", code, err, avoid)
|
||||||
if code != 200 {
|
if code != 200 {
|
||||||
return nil, code, err
|
return nil, code, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user