Skip to content

Commit

Permalink
add logs for killing process
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvsadana committed Oct 17, 2023
1 parent 4576642 commit f09da9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/handlers/indexers/indexer_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ pub trait Indexer {
};

if !self.is_running(indexer.clone()).await? {
println!("the indexer isn't running!");
return Err(IndexerError::InternalServerError(format!(
"Cannot stop indexer that's not running, indexer id {}",
indexer.id
Expand All @@ -135,8 +136,8 @@ pub trait Indexer {

let is_success = Command::new("kill")
// Silence stdout and stderr
.stdout(Stdio::null())
.stderr(Stdio::null())
// .stdout(Stdio::null())
// .stderr(Stdio::null())
.args([
process_id.to_string().as_str(),
])
Expand Down
1 change: 0 additions & 1 deletion src/tests/server/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ async fn stop_indexer(#[future] setup_server: SocketAddr) {
// Ignoring this test case as it's flaky. Works locally fails on github actions.
#[rstest]
#[tokio::test]
#[ignore]
async fn failed_stop_indexer(#[future] setup_server: SocketAddr) {
let addr = setup_server.await;

Expand Down

0 comments on commit f09da9d

Please sign in to comment.