Skip to content

Commit

Permalink
fix(video): check if chat is being processed before killing chat down…
Browse files Browse the repository at this point in the history
…load
  • Loading branch information
Zibbp committed Feb 9, 2024
1 parent e0be866 commit d878420
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/workflows/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,11 @@ func DownloadTwitchLiveVideoWorkflow(ctx workflow.Context, input dto.ArchiveVide
}

// kill live chat download
err = workflow.ExecuteActivity(ctx, activities.KillTwitchLiveChatDownload, input).Get(ctx, nil)
if err != nil {
return workflowErrorHandler(err, input, "kill-chat-download")
if input.Queue.ChatProcessing {
err = workflow.ExecuteActivity(ctx, activities.KillTwitchLiveChatDownload, input).Get(ctx, nil)
if err != nil {
return workflowErrorHandler(err, input, "kill-chat-download")
}
}

// mark live channel as not live
Expand Down

0 comments on commit d878420

Please sign in to comment.