From b1b42aac2b34d04cdda1b0bc92e2719d3de6c5f8 Mon Sep 17 00:00:00 2001 From: janskiba Date: Thu, 4 Apr 2024 16:35:09 +0200 Subject: [PATCH] Add timeout to table fetching --- src/handlers.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/handlers.rs b/src/handlers.rs index 100f6a9..9fd45ef 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -174,8 +174,7 @@ pub async fn fetch_project_tables_names_request( info!("Fetch Project Tables Status {task:#?}"); - let handle = tokio::task::spawn(fetch_project_tables_from_beam(task)); - handle.await? + fetch_project_tables_from_beam(task).await } pub async fn check_project_status_request( @@ -534,7 +533,7 @@ async fn fetch_project_tables_from_beam( let res = BEAM_CLIENT .raw_beam_request( Method::GET, - &format!("/v1/tasks/{}/results?wait_count={}", task.id, task.to.len()), + &format!("/v1/tasks/{}/results?wait_count={}&wait_time=30s", task.id, task.to.len()), ) .header( header::ACCEPT,