added debug logging
This commit is contained in:
parent
370dac201b
commit
58dc579255
@ -84,14 +84,15 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest)
|
|||||||
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 {
|
||||||
|
bl := l.With().Str("booking",b.UUID).Logger()
|
||||||
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)
|
||||||
meth = strings.ReplaceAll(meth, ":start_date", b.ExpectedStartDate.Format("2006-01-02T15:04:05"))
|
meth = strings.ReplaceAll(meth, ":start_date", b.ExpectedStartDate.Format("2006-01-02T15:04:05"))
|
||||||
meth = strings.ReplaceAll(meth, ":end_date", b.ExpectedEndDate.Format("2006-01-02T15:04:05"))
|
meth = strings.ReplaceAll(meth, ":end_date", b.ExpectedEndDate.Format("2006-01-02T15:04:05"))
|
||||||
request.Caller.URLS[tools.BOOKING][tools.GET] = meth
|
request.Caller.URLS[tools.BOOKING][tools.GET] = meth
|
||||||
l.Debug().Msg("Get booking on" + b.DestPeerID)
|
bl.Debug().Msg("Get booking on" + b.DestPeerID)
|
||||||
_, err := (&peer.Peer{}).LaunchPeerExecution(b.DestPeerID, b.ResourceID, tools.BOOKING, tools.GET, nil, request.Caller)
|
_, err := (&peer.Peer{}).LaunchPeerExecution(b.DestPeerID, b.ResourceID, tools.BOOKING, tools.GET, nil, request.Caller)
|
||||||
l.Debug().Msg("Received response from Get booking on " + b.DestPeerID)
|
bl.Debug().Msg("Received response from Get booking on " + b.DestPeerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, wf, execs, bookings, err
|
return false, wf, execs, bookings, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user