Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
stable_build_and_test:
name: Stable Build and Test Rust
timeout-minutes: 90
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Install system packages
Expand Down
16 changes: 15 additions & 1 deletion client-libraries/rust/src/ingest_client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use tokio::{
time::timeout,
};
use tokio_rustls::client::TlsStream;
use tracing::warn;
use url::Url;

pub struct IngestClient<S> {
Expand Down Expand Up @@ -223,7 +224,20 @@ impl IngestClient<UnauthenticatedState> {
allow_insecure_tls: bool,
) -> Result<IngestClient<UnauthenticatedState>, IngestClientInitializationError> {
let connection = IngestConnection::connect(endpoint, allow_insecure_tls).await?;
let common = IngestClientCommon::new(Duration::from_secs(1), connection);

let mut timeout_secs = 1.0f32;
if let Ok(modality_client_timeout) = std::env::var("MODALITY_CLIENT_TIMEOUT") {
if let Ok(f) = modality_client_timeout.parse::<f32>() {
timeout_secs = f;
} else {
warn!(
?modality_client_timeout,
"MODALITY_CLIENT_TIMEOUT value cannot be parsed as a float; using default."
);
}
}

let common = IngestClientCommon::new(Duration::from_secs_f32(timeout_secs), connection);

Ok(IngestClient {
state: UnauthenticatedState {},
Expand Down
Loading