Skip to content

Commit

Permalink
fix: shutdown of the cdk consumer (#4273)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev authored Nov 26, 2024
1 parent 1b00c9e commit ddcb063
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/cdk/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ mod local_index {

use anyhow::{anyhow, Result};
use fluvio_connector_deployer::DeploymentResult;
use sysinfo::Pid;
use sysinfo::{Pid, Signal};
use tracing::debug;

const LOCAL_INDEX_FILE_NAME: &str = "fluvio_cdk_deploy_index.toml";
Expand Down Expand Up @@ -515,7 +515,7 @@ mod local_index {
} = entry;

if let Some(process) = self.system.process(Pid::from_u32(*process_id)) {
process.kill();
process.kill_with(Signal::Term);
}

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-connector-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ required-features = ["derive"]
[dependencies]
async-trait = { workspace = true }
async-channel = { workspace = true }
ctrlc = { workspace = true }
ctrlc = { workspace = true, features = ["termination"]}
anyhow = { workspace = true }
futures = { workspace = true }
futures-util = { workspace = true , features = ["sink"]}
Expand Down
4 changes: 3 additions & 1 deletion tests/cli/cdk_smoke_tests/cdk-graceful-shutdown.bats
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ meta:
offset:
strategy: auto
start: beginning
flush: 10s
flush-period:
secs: 10
nanos: 0
custom:
api_key: api_key
client_id: client_id
Expand Down

0 comments on commit ddcb063

Please sign in to comment.