Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TroyKomodo committed Jul 18, 2023
1 parent e6ae4c3 commit c5b0337
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 5 additions & 3 deletions video/transcoder/src/tests/transcoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![allow(unused_imports)]
#![allow(dead_code)]

use core::panic;
use std::{
collections::HashMap, io::Cursor, net::SocketAddr, path::PathBuf, pin::Pin, sync::Arc,
time::Duration,
Expand Down Expand Up @@ -391,17 +392,18 @@ async fn test_transcode() {

tracing::debug!("finished sending frames");

tokio::time::sleep(Duration::from_millis(250)).await;

watch_stream_req
.send(Ok(WatchStreamResponse {
data: Some(watch_stream_response::Data::ShuttingDown(true)),
}))
.await
.unwrap();

let redis = global.redis.clone();
drop(watch_stream_req);

tokio::time::sleep(Duration::from_millis(250)).await;

let redis = global.redis.clone();
drop(global);
handler
.cancel()
Expand Down
9 changes: 8 additions & 1 deletion video/transcoder/src/transcoder/job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ fn report_to_ingest(
) -> impl Stream<Item = Result<()>> + Send + 'static {
stream!({
while let Some(msg) = channel.recv().await {
tracing::debug!("sending message: {:?}", msg);
match client
.transcoder_event(msg)
.timeout(Duration::from_secs(5))
Expand Down Expand Up @@ -708,8 +709,12 @@ impl Job {

drop(report);

tracing::debug!("waiting for report to ingest to exit");

// Finish all the report futures
while report_fut.next().await.is_some() {}
while report_fut.next().await.is_some() {
tracing::debug!("report to ingest exited");
}

tracing::info!("waiting for playlist update to exit");

Expand Down Expand Up @@ -804,6 +809,8 @@ impl Job {
self.report_error("ffmpeg exited with non-zero status", false)
.await;
}

tracing::debug!("ffmpeg exited");
}

async fn handle_msg(
Expand Down
1 change: 1 addition & 0 deletions video/transcoder/src/transcoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub async fn run(global: Arc<GlobalState>) -> Result<()> {
tokio::spawn(handle_message(global.clone(), m, child_token.clone()));
},
_ = global.ctx.done() => {
tracing::debug!("context done");
return Ok(());
}
}
Expand Down

0 comments on commit c5b0337

Please sign in to comment.