diff --git a/router/client/src/sharded_client.rs b/router/client/src/sharded_client.rs index 2f57a437..73524740 100644 --- a/router/client/src/sharded_client.rs +++ b/router/client/src/sharded_client.rs @@ -20,7 +20,7 @@ impl ShardedClient { /// the other shards and returns all uris/unix sockets with the `service_discovery` gRPC method. async fn from_master_client(mut master_client: Client) -> Result { // Get all uris/unix sockets from the master client - let uris = master_client.service_discovery().await.unwrap(); + let uris = master_client.service_discovery().await?; let futures = uris.into_iter().map(Client::connect_uds); let clients: Result> = join_all(futures).await.into_iter().collect(); Ok(Self::new(clients?)) diff --git a/router/src/health.rs b/router/src/health.rs index 02edf328..5bfb6717 100644 --- a/router/src/health.rs +++ b/router/src/health.rs @@ -4,6 +4,8 @@ use text_generation_client::{ Batch, NextTokenChooserParameters, Request, ShardedClient, StoppingCriteriaParameters, }; +const LIVENESS_ID: u64 = u64::MAX; + #[derive(Clone, Debug)] pub(crate) struct Health { client: ShardedClient, @@ -27,7 +29,7 @@ impl Health { // Dummy batch of 1 token and 1 generated token let liveness_request = Request { - id: u64::MAX, + id: LIVENESS_ID, inputs: "liveness".to_string(), truncate: 10, parameters: Some(NextTokenChooserParameters {