Skip to content

Commit

Permalink
feat(deployer): log error in case of failed start_kill
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianbarbu committed Sep 18, 2023
1 parent 31ee040 commit ecb9740
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deployer/src/runtime_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use shuttle_proto::{
};
use tokio::{io::AsyncBufReadExt, io::BufReader, process, sync::Mutex};
use tonic::transport::Channel;
use tracing::{debug, info, trace};
use tracing::{debug, error, info, trace};
use uuid::Uuid;

const MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR");
Expand Down Expand Up @@ -177,7 +177,13 @@ impl RuntimeManager {

pub fn kill_process(&mut self, id: Uuid) {
if let Some((mut process, _)) = self.runtimes.lock().unwrap().remove(&id) {
let _ = process.start_kill();
match process.start_kill() {
Ok(_) => (),
Err(err) => error!(
deployment_id = %id, "failed to start the killing of the runtime: {}",
err
),
}
}
}

Expand Down

0 comments on commit ecb9740

Please sign in to comment.