From ca0676a8282efa2d4d3a21b11878989640132f55 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Thu, 1 Feb 2024 13:18:59 -0800 Subject: [PATCH] add messages for aborted egress (#603) --- pkg/pipeline/controller.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/pipeline/controller.go b/pkg/pipeline/controller.go index 086a58f8..98014ffe 100644 --- a/pkg/pipeline/controller.go +++ b/pkg/pipeline/controller.go @@ -215,6 +215,7 @@ func (c *Controller) Run(ctx context.Context) *livekit.EgressInfo { select { case <-c.stopped.Watch(): c.Info.Status = livekit.EgressStatus_EGRESS_ABORTED + c.Info.Error = "Start signal not received" return c.Info case <-start: // continue @@ -391,6 +392,7 @@ func (c *Controller) SendEOS(ctx context.Context) { switch c.Info.Status { case livekit.EgressStatus_EGRESS_STARTING: c.Info.Status = livekit.EgressStatus_EGRESS_ABORTED + c.Info.Error = "Stop called before pipeline could start" fallthrough case livekit.EgressStatus_EGRESS_ABORTED, @@ -449,7 +451,7 @@ func (c *Controller) Close() { c.Info.EndedAt = now // update status - if c.Info.Error != "" { + if c.Info.Error != "" && c.Info.Status != livekit.EgressStatus_EGRESS_ABORTED { c.Info.Status = livekit.EgressStatus_EGRESS_FAILED if o := c.GetStreamConfig(); o != nil { for _, streamInfo := range o.StreamInfo { @@ -462,6 +464,7 @@ func (c *Controller) Close() { switch c.Info.Status { case livekit.EgressStatus_EGRESS_STARTING: c.Info.Status = livekit.EgressStatus_EGRESS_ABORTED + c.Info.Error = "Stop called before pipeline could start" case livekit.EgressStatus_EGRESS_ACTIVE, livekit.EgressStatus_EGRESS_ENDING: