diff --git a/justfile b/justfile index c613449..e8fd4d8 100644 --- a/justfile +++ b/justfile @@ -10,10 +10,10 @@ run *ARGS: cargo run {{ARGS}} head-node *ARGS: - cargo run --bin head-node --features="head" + cargo run --bin head-node worker-node *ARGS: - cargo run --bin worker-node --features="worker" + cargo run --bin worker-node # Run 'cargo watch' to run the project (auto-recompiles) watch *ARGS: diff --git a/yotei-nodes/Cargo.toml b/yotei-nodes/Cargo.toml index 67e1c46..08ce724 100644 --- a/yotei-nodes/Cargo.toml +++ b/yotei-nodes/Cargo.toml @@ -31,16 +31,11 @@ colorful = "0.3.2" [build-dependencies] tonic-build = "0.12.2" -[features] -head = [] -worker = [] [[bin]] name = "head-node" path = "src/head.rs" -required-features = [ "head" ] [[bin]] name = "worker-node" path = "src/worker.rs" -required-features = [ "worker" ] diff --git a/yotei-nodes/src/head.rs b/yotei-nodes/src/head.rs index 63fe336..8257236 100644 --- a/yotei-nodes/src/head.rs +++ b/yotei-nodes/src/head.rs @@ -16,7 +16,6 @@ mod sched { // tonic::include_file_descriptor_set!("protocol_descriptor").into(); } - #[derive(Parser)] #[command(author, version, about)] #[command(propagate_version = true)] @@ -63,8 +62,11 @@ async fn main() -> Result<(), Box> { let addr = "[::1]:50051".parse()?; info!("Starting gRPC server on {}", addr); let data = crate::util::grpc::DataService::default(); + debug!("{:#?}", data); let auth = crate::util::grpc::AuthService::default(); + debug!("{:#?}", auth); let alive = crate::util::grpc::AliveCheckService::default(); + debug!("{:#?}", alive); let grpc_server = Server::builder() .add_service(sched::data_server::DataServer::new(data)) .add_service(sched::auth_server::AuthServer::new(auth)) diff --git a/yotei-nodes/src/worker.rs b/yotei-nodes/src/worker.rs index 873d9b2..8a822b4 100644 --- a/yotei-nodes/src/worker.rs +++ b/yotei-nodes/src/worker.rs @@ -82,14 +82,6 @@ async fn main() -> Result<(), Box> { })) .await? ); - // debug!( - // "{:#?}", - // auth.logout(tonic::Request::new(LogoutRequest { - // node_id: "compute-1".to_string(), - // })) - // .await? - // ); - // let _ = send_shutdown.send(()); alive_hand.await?; Ok(()) }