Skip to content

Commit

Permalink
Fix context for logging (#3322)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 authored Dec 17, 2024
1 parent a842a0d commit 3ac5972
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/ai_live_video.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func startTricklePublish(ctx context.Context, url *url.URL, params aiRequestPara
}

// Start payments which probes a segment every "paymentProcessInterval" and sends a payment
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(ctx)
priceInfo := sess.OrchestratorInfo.PriceInfo
var paymentProcessor *LivePaymentProcessor
if priceInfo != nil && priceInfo.PricePerUnit != 0 {
Expand Down
3 changes: 2 additions & 1 deletion server/ai_mediaserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ func (ls *LivepeerServer) StartLiveVideo() http.Handler {

requestID := string(core.RandomManifestID())
ctx = clog.AddVal(ctx, "request_id", requestID)
clog.Infof(ctx, "Received live video AI request for %s. pipelineParams=%v streamID=%s", streamName, pipelineParams, streamID)
ctx = clog.AddVal(ctx, "stream_id", streamID)
clog.Infof(ctx, "Received live video AI request for %s. pipelineParams=%v", streamName, pipelineParams)

// Kick off the RTMP pull and segmentation as soon as possible
ssr := media.NewSwitchableSegmentReader()
Expand Down

0 comments on commit 3ac5972

Please sign in to comment.