Skip to content

Commit

Permalink
Add timeout to table fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
Threated committed Apr 4, 2024
1 parent e24c2ae commit b1b42aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b1b42aa

Please sign in to comment.