File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,8 @@ pub async fn mark_uploaded(
241241 . context ( error:: DatabaseSnafu ) ?;
242242
243243 // Publish event so the ingestor can start transmux.
244+ // Failure here is fatal: without the event the ingestor never picks up the
245+ // video and the status stays stuck at "processing" forever.
244246 if let Err ( e) = state
245247 . event_bus
246248 . send_serde_json ( & DomainEvent :: VideoUploaded {
@@ -249,7 +251,10 @@ pub async fn mark_uploaded(
249251 . await
250252 {
251253 tracing:: warn!( "failed to publish VideoUploaded event: {e}" ) ;
252- // Non-fatal -- the status has already been updated.
254+ return error:: InternalSnafu {
255+ message : format ! ( "failed to publish VideoUploaded event: {e}" ) ,
256+ }
257+ . fail ( ) ;
253258 }
254259
255260 Ok ( ApiResponse :: accepted ( UploadedResponse {
You can’t perform that action at this time.
0 commit comments