From 37d152feeb6abeb061daa5c93c24916e520b1fd0 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 18 Sep 2024 14:32:09 +0200 Subject: [PATCH] fix: postgres scripts that take longer than 20s do not timeout anymore --- backend/windmill-worker/src/pg_executor.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/windmill-worker/src/pg_executor.rs b/backend/windmill-worker/src/pg_executor.rs index 4f79c3a972..b55f550428 100644 --- a/backend/windmill-worker/src/pg_executor.rs +++ b/backend/windmill-worker/src/pg_executor.rs @@ -244,9 +244,7 @@ pub async fn do_postgresql( .map_err(to_anyhow)?; let handle = tokio::spawn(async move { - if let Err(e) = - tokio::time::timeout(std::time::Duration::from_secs(20), connection).await - { + if let Err(e) = connection.await { let mut mtex = CONNECTION_CACHE.lock().await; *mtex = None; tracing::error!("connection error: {}", e); @@ -264,9 +262,7 @@ pub async fn do_postgresql( .map_err(to_anyhow)?; let handle = tokio::spawn(async move { - if let Err(e) = - tokio::time::timeout(std::time::Duration::from_secs(20), connection).await - { + if let Err(e) = connection.await { let mut mtex = CONNECTION_CACHE.lock().await; *mtex = None; tracing::error!("connection error: {}", e);