Skip to content

Commit

Permalink
add messages for aborted egress (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 authored Feb 1, 2024
1 parent c5eab0a commit ca0676a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/pipeline/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand All @@ -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:
Expand Down

0 comments on commit ca0676a

Please sign in to comment.