We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c4613d commit d1ceed7Copy full SHA for d1ceed7
server/src/middleware/timeout_middleware.rs
@@ -28,7 +28,17 @@ pub async fn timeout_15secs(
28
let base_server_url =
29
std::env::var("BASE_SERVER_URL").unwrap_or_else(|_| "https://api.trieve.ai".to_string());
30
31
- match tokio::time::timeout(std::time::Duration::from_secs(15), next.call(service_req)).await {
+ let mut timeout_secs = 15;
32
+ if method == "POST" && path == "/api/file" {
33
+ timeout_secs = 300;
34
+ }
35
+
36
+ match tokio::time::timeout(
37
+ std::time::Duration::from_secs(timeout_secs),
38
+ next.call(service_req),
39
+ )
40
+ .await
41
+ {
42
Ok(res) => res,
43
Err(_err) => {
44
let email_body = format!(
0 commit comments