log when auto egress fails (#1029)

* log when auto egress fails

* use room logger
This commit is contained in:
David Colburn
2022-09-22 12:23:25 -07:00
committed by GitHub
parent 803046b882
commit 20c565ca02
2 changed files with 7 additions and 3 deletions
+4 -2
View File
@@ -732,7 +732,7 @@ func (r *Room) onTrackPublished(participant types.LocalParticipant, track types.
// auto track egress
if r.internal != nil && r.internal.TrackEgress != nil {
StartTrackEgress(
if err := StartTrackEgress(
context.Background(),
r.egressLauncher,
r.telemetry,
@@ -740,7 +740,9 @@ func (r *Room) onTrackPublished(participant types.LocalParticipant, track types.
track,
r.Name(),
r.ID(),
)
); err != nil {
r.Logger.Errorw("failed to launch track egress", err)
}
}
}
+3 -1
View File
@@ -25,7 +25,7 @@ func StartTrackEgress(
track types.MediaTrack,
roomName livekit.RoomName,
roomID livekit.RoomID,
) {
) error {
if req, err := startTrackEgress(ctx, launcher, opts, track, roomName, roomID); err != nil {
// send egress failed webhook
ts.NotifyEvent(ctx, &livekit.WebhookEvent{
@@ -38,7 +38,9 @@ func StartTrackEgress(
Request: &livekit.EgressInfo_Track{Track: req},
},
})
return err
}
return nil
}
func startTrackEgress(