In CheckBooking mooved the loop on bookings outside of the loop of execs, which seems to repeat the Peer execution on booking an exponential number of time
This commit is contained in:
@@ -82,6 +82,7 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest)
|
|||||||
for i, exec := range execs {
|
for i, exec := range execs {
|
||||||
l.Debug().Msg("looping throughs execs : " + string(i))
|
l.Debug().Msg("looping throughs execs : " + string(i))
|
||||||
bookings = append(bookings, exec.Book(ws.UUID, wfID, priceds)...)
|
bookings = append(bookings, exec.Book(ws.UUID, wfID, priceds)...)
|
||||||
|
}
|
||||||
for _, b := range bookings {
|
for _, b := range bookings {
|
||||||
meth := request.Caller.URLS[tools.BOOKING][tools.GET]
|
meth := request.Caller.URLS[tools.BOOKING][tools.GET]
|
||||||
meth = strings.ReplaceAll(meth, ":id", b.ResourceID)
|
meth = strings.ReplaceAll(meth, ":id", b.ResourceID)
|
||||||
@@ -94,7 +95,6 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return false, wf, execs, bookings, err
|
return false, wf, execs, bookings, err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return true, wf, execs, bookings, nil
|
return true, wf, execs, bookings, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user