logging on the booking uuid before the post booking

This commit is contained in:
pb 2025-05-27 09:51:41 +02:00
parent 527e622774
commit 901622fee0

View File

@ -107,9 +107,9 @@ func getBooking(l zerolog.Logger, b *booking.Booking, request *tools.APIRequest,
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"))
request.Caller.URLS[tools.BOOKING][tools.GET] = meth
bl.Debug().Msg("Get booking " + b.UUID + "on" + b.DestPeerID)
bl.Debug().Msg("Get booking " + b.UUID + " on " + b.DestPeerID)
_, err := (&peer.Peer{}).LaunchPeerExecution(b.DestPeerID, b.ResourceID, tools.BOOKING, tools.GET, nil, request.Caller)
bl.Debug().Msg("Received response from Get booking on " + b.DestPeerID)
bl.Debug().Msg("Received response from Get booking " + b.UUID + " on " + b.DestPeerID)
if err != nil {
errCh <- err
return
@ -138,10 +138,10 @@ func (ws *WorkflowSchedule) Schedules(wfID string, request *tools.APIRequest) (*
ws.Workflow = wf
for _, booking := range bookings {
l := logs.GetLogger().With().Str("SchedulerID",ws.UUID).Logger()
l.Info().Msg("Booking on " + booking.DestPeerID)
l.Debug().Msg("Booking " + booking.UUID + " on " + booking.DestPeerID)
_, err := (&peer.Peer{}).LaunchPeerExecution(booking.DestPeerID, "",
tools.BOOKING, tools.POST, booking.Serialize(booking), request.Caller)
l.Debug().Msg("Received answer for booking on " + booking.DestPeerID)
l.Debug().Msg("Received answer for booking " + booking.UUID + " on " + booking.DestPeerID)
if err != nil {
return ws, wf, executions, errors.New("could not launch the peer execution : " + fmt.Sprintf("%v", err))
}