Commit 3045311c authored by ale's avatar ale
Browse files

Improve transcoderd logging

parent a9f5c36a
Pipeline #16543 passed with stages
in 2 minutes and 52 seconds
......@@ -122,12 +122,10 @@ func (e *Election) runOnce(ctx context.Context, data string, op Op) error {
// Invoke the leader operation.
log.Printf("we are now the leader for %s", e.path)
err = op(ctx)
// Resign, if the session is still valid. Use a standalone
// Context to resign even on cancellation.
log.Printf("resigning leadership for %s", e.path)
rctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
rerr := e.election.Resign(rctx)
......@@ -83,6 +83,8 @@ func (t *transcoder) run(ctx context.Context) error {
return err
log.Printf("starting transcode of %s to %s", t.mount.TranscodeParams.SourcePath, t.mount.Path)
// Start liquidsoap and run until the context is canceled.
cmd := exec.CommandContext(ctx, *liquidsoapBin, "-T", "-U", "-v", configFile.Name())
cmd.Stdout = os.Stderr
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment