Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev committed Apr 2, 2024
1 parent 9760a29 commit 1b78acc
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 deletions.
2 changes: 0 additions & 2 deletions crates/fluvio-controlplane/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ pub mod spu_api;
pub mod replica;
pub mod message;
pub mod requests;
// pub mod remote_cluster;
// pub mod upstream_cluster;

pub use alias::*;
mod alias {
Expand Down
18 changes: 6 additions & 12 deletions crates/fluvio-sc/src/services/private_api/private_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,18 @@ where

info!(spu_id, "SPU connected");

let health_check = context.health().clone();

health_check.update(spu_id, true).await;

if let Err(err) = dispatch_loop(context, spu_id, api_stream, sink).await {
error!("error with SPU <{}>, error: {}", spu_id, err);
}

info!(spu_id, "Terminating connection to SPU");

health_check.update(spu_id, false).await;

Ok(())
}
}
Expand All @@ -127,10 +133,6 @@ async fn dispatch_loop<C>(
where
C: MetadataItem,
{
let health_check = context.health().clone();

health_check.update(spu_id, true).await;

let mut spu_spec_listener = context.spus().change_listener();
let mut partition_spec_listener = context.partitions().change_listener();
let mut sm_spec_listener = context.smartmodules().change_listener();
Expand Down Expand Up @@ -169,8 +171,6 @@ where
match req_message {
InternalScRequest::UpdateLrsRequest(msg) => {
receive_lrs_update(&context,msg.request).await;
// health_check.update(spu_id, true).await;

},
InternalScRequest::RegisterSpuRequest(msg) => {
error!("registration req only valid during initialization: {:#?}",msg);
Expand Down Expand Up @@ -205,10 +205,6 @@ where

},

_ = sm_spec_listener.listen() => {
debug!("smartmodule lister changed");
},

_ = rm_cluster_listener.listen() => {
debug!("remote cluster lister changed");
},
Expand All @@ -220,8 +216,6 @@ where
}
}

health_check.update(spu_id, false).await;

Ok(())
}

Expand Down

0 comments on commit 1b78acc

Please sign in to comment.