PollRange & PollItem: min timeout = 1 sec
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Alex 2023-01-11 15:03:08 +01:00
parent bba13f40fc
commit cbfae673e8
Signed by: lx
GPG key ID: 0E496D15096376BE
2 changed files with 2 additions and 2 deletions

View file

@ -256,7 +256,7 @@ pub(crate) async fn handle_poll_range(
let query = parse_json_body::<PollRangeQuery>(req).await?; let query = parse_json_body::<PollRangeQuery>(req).await?;
let timeout_msec = query.timeout.unwrap_or(300).clamp(10, 600) * 1000; let timeout_msec = query.timeout.unwrap_or(300).clamp(1, 600) * 1000;
let resp = garage let resp = garage
.k2v .k2v

View file

@ -206,7 +206,7 @@ pub async fn handle_poll_item(
let causal_context = let causal_context =
CausalContext::parse(&causality_token).ok_or_bad_request("Invalid causality token")?; CausalContext::parse(&causality_token).ok_or_bad_request("Invalid causality token")?;
let timeout_msec = timeout_secs.unwrap_or(300).clamp(10, 600) * 1000; let timeout_msec = timeout_secs.unwrap_or(300).clamp(1, 600) * 1000;
let item = garage let item = garage
.k2v .k2v