From 0c6f8a3813920c34b9b6150ef09819a9399a35bc Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:48:17 +0100 Subject: [PATCH] Increase default DA timeout on backend Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> --- spog/api/src/endpoints/analyze.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spog/api/src/endpoints/analyze.rs b/spog/api/src/endpoints/analyze.rs index cb744bf48..454c36441 100644 --- a/spog/api/src/endpoints/analyze.rs +++ b/spog/api/src/endpoints/analyze.rs @@ -8,6 +8,7 @@ use bombastic_model::prelude::SBOM; use bytes::Bytes; use futures::Stream; use http::{header, StatusCode}; +use std::time::Duration; use tracing::instrument; use trustification_analytics::Tracker; use trustification_common::error::ErrorInformation; @@ -70,7 +71,11 @@ pub struct CrdaClient { impl CrdaClient { pub fn new(url: Url, snyk_token: Option) -> Self { - let client = reqwest::Client::new(); + let client = reqwest::Client::builder() + .timeout(Duration::from_secs(60 * 3)) + .build() + .expect("Could not create the crda client"); + Self { client, url,