Page MenuHomePhabricator

D13355.id44274.diff
No OneTemporary

D13355.id44274.diff

diff --git a/shared/grpc_clients/src/lib.rs b/shared/grpc_clients/src/lib.rs
--- a/shared/grpc_clients/src/lib.rs
+++ b/shared/grpc_clients/src/lib.rs
@@ -10,14 +10,16 @@
use tonic::transport::Channel;
use tracing::info;
-const CONNECT_TIMEOUT_DURATION: Duration = Duration::from_secs(5);
+const CONNECT_TIMEOUT_DURATION: Duration = Duration::from_secs(10);
+const REQUEST_TIMEOUT_DURATION: Duration = Duration::from_secs(30);
pub(crate) async fn get_grpc_service_channel(
url: &str,
) -> Result<Channel, Error> {
info!("Connecting to gRPC service at {}", url);
let channel = Channel::from_shared(url.to_string())?
- .connect_timeout(CONNECT_TIMEOUT_DURATION);
+ .connect_timeout(CONNECT_TIMEOUT_DURATION)
+ .timeout(REQUEST_TIMEOUT_DURATION);
Ok(channel.connect().await?)
}

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 10:45 PM (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2697017
Default Alt Text
D13355.id44274.diff (808 B)

Event Timeline