diff --git a/deployer/src/main.rs b/deployer/src/main.rs index f74af3d542..39831db07a 100644 --- a/deployer/src/main.rs +++ b/deployer/src/main.rs @@ -55,7 +55,9 @@ async fn main() { .spawn() .unwrap(); + // Sleep because the timeout below does not seem to work tokio::time::sleep(Duration::from_secs(2)).await; + info!("connecting runtime client"); let conn = Endpoint::new("http://127.0.0.1:6001") .unwrap() diff --git a/runtime/src/legacy/mod.rs b/runtime/src/legacy/mod.rs index db25b8f7cd..2d3a8faada 100644 --- a/runtime/src/legacy/mod.rs +++ b/runtime/src/legacy/mod.rs @@ -86,7 +86,8 @@ impl Runtime for Legacy { let mut factory = abstract_factory.get_factory(service_name); let logs_tx = self.logs_tx.lock().unwrap().clone(); - let logger = Logger::new(logs_tx, Uuid::from_slice(&request.deployment_id).unwrap()); + let deployment_id = Uuid::from_slice(&request.deployment_id).unwrap(); + let logger = Logger::new(logs_tx, deployment_id); let so_path = self .so_path @@ -127,6 +128,7 @@ impl Runtime for Legacy { if let Some(mut logs_rx) = logs_rx { let (tx, rx) = mpsc::channel(1); + // Move logger items into stream to be returned tokio::spawn(async move { while let Some(log) = logs_rx.recv().await { tx.send(Ok(log.into())).await.unwrap();