Skip to content

Commit

Permalink
Remove empty initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
javitonino committed Jan 23, 2024
1 parent 646ca81 commit b0360b4
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion nucliadb_node/src/bin/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ pub async fn start_grpc_service(
tokio::spawn(health_checker(health_reporter, settings.clone()));

let grpc_driver = NodeReaderGRPCDriver::new(settings.clone());
grpc_driver.initialize().await?;

Server::builder()
.layer(tracing_middleware)
Expand Down
1 change: 0 additions & 1 deletion nucliadb_node/src/bin/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ pub async fn start_grpc_service(
if settings.node_role() == NodeRole::Primary {
let grpc_driver = NodeWriterGRPCDriver::new(settings.clone(), shard_cache.clone())
.with_sender(metadata_sender);
grpc_driver.initialize().await?;
server_builder = server_builder.add_service(GrpcServer::new(grpc_driver));
}
let replication_server = replication::replication_service_server::ReplicationServiceServer::new(
Expand Down
5 changes: 0 additions & 5 deletions nucliadb_node/src/grpc/grpc_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ impl NodeReaderGRPCDriver {
}
}

/// This function must be called before using this service
pub async fn initialize(&self) -> NodeResult<()> {
Ok(())
}

async fn obtain_shard(&self, id: impl Into<String>) -> Result<Arc<ShardReader>, tonic::Status> {
let id = id.into();
let id_clone = id.clone();
Expand Down
5 changes: 0 additions & 5 deletions nucliadb_node/src/grpc/grpc_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ impl NodeWriterGRPCDriver {
}
}

/// This function must be called before using this service
pub async fn initialize(&self) -> NodeResult<()> {
Ok(())
}

pub fn with_sender(self, sender: UnboundedSender<NodeWriterEvent>) -> Self {
Self {
sender: Some(sender),
Expand Down
5 changes: 0 additions & 5 deletions nucliadb_node/src/replication/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ impl ReplicationServiceGRPCDriver {
node_id,
}
}

/// This function must be called before using this service
pub async fn initialize(&self) -> NodeResult<()> {
Ok(())
}
}

async fn stream_file(
Expand Down
8 changes: 0 additions & 8 deletions nucliadb_node/tests/common/node_services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,6 @@ impl NodeFixture {
self.reader_server_task = Some(tokio::spawn(async move {
lifecycle::initialize_reader(settings.clone());
let grpc_driver = NodeReaderGRPCDriver::new(settings.clone());
grpc_driver
.initialize()
.await
.expect("Unable to initialize reader gRPC");
let reader_server = NodeReaderServer::new(grpc_driver);
Server::builder()
.add_service(reader_server)
Expand Down Expand Up @@ -289,10 +285,6 @@ impl NodeFixture {
self.reader_server_task = Some(tokio::spawn(async move {
lifecycle::initialize_reader(settings.clone());
let grpc_driver = NodeReaderGRPCDriver::new(settings.clone());
grpc_driver
.initialize()
.await
.expect("Unable to initialize reader gRPC");
let reader_server = NodeReaderServer::new(grpc_driver);
Server::builder()
.add_service(reader_server)
Expand Down

0 comments on commit b0360b4

Please sign in to comment.