diff --git a/binaries/daemon/src/lib.rs b/binaries/daemon/src/lib.rs index 1fd3217f..aa4e3279 100644 --- a/binaries/daemon/src/lib.rs +++ b/binaries/daemon/src/lib.rs @@ -1330,7 +1330,7 @@ fn close_input( #[derive(Debug, Clone)] struct RunningNode { - pid: usize, + pid: u32, } pub struct RunningDataflow { @@ -1444,7 +1444,7 @@ impl RunningDataflow { system.refresh_processes(); for (node, node_details) in running_nodes.iter() { - if let Some(process) = system.process(Pid::from(node_details.pid.clone())) { + if let Some(process) = system.process(Pid::from(node_details.pid as usize)) { process.kill(); warn!( "{node} was killed due to not stopping within the {:#?} grace period", diff --git a/binaries/daemon/src/spawn.rs b/binaries/daemon/src/spawn.rs index 7e0eff15..0dc353de 100644 --- a/binaries/daemon/src/spawn.rs +++ b/binaries/daemon/src/spawn.rs @@ -42,7 +42,7 @@ pub async fn spawn_node( daemon_tx: mpsc::Sender>, dataflow_descriptor: Descriptor, clock: Arc, -) -> eyre::Result { +) -> eyre::Result { let node_id = node.id.clone(); tracing::debug!("Spawning node `{dataflow_id}/{node_id}`"); @@ -264,7 +264,7 @@ pub async fn spawn_node( .expect("Failed to create log file"); let mut child_stdout = tokio::io::BufReader::new(child.stdout.take().expect("failed to take stdout")); - let pid = child.id().unwrap() as usize; // Todo: Manage failure + let pid = child.id().unwrap(); let stdout_tx = tx.clone(); // Stdout listener stream