Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Jacobsen committed Dec 30, 2023
1 parent a3c8dcb commit 0ff30b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/market_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,14 @@ impl MarketHandler {
continue;
}

let resp = match rate_limited_get_endpoint(
let maybe_resp = rate_limited_get_endpoint(
read_rate_limiter_clone.clone(),
"bets".to_string(),
&params,
)
.await
{
.await;

let resp = match maybe_resp {
Ok(resp) => resp,
Err(e) => {
warn!("continuing... couldn't get most recent bet due to api error: {e}");
Expand All @@ -524,6 +525,7 @@ impl MarketHandler {
most_recent_id = bets.last().unwrap().id.clone();
}

// TODO remove this! We have our own rate limiter
sleep(Duration::from_millis(500)).await;
}
});
Expand Down

0 comments on commit 0ff30b2

Please sign in to comment.