Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ewmaa #3

Merged
merged 11 commits into from
Dec 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor tweaks
  • Loading branch information
Axel-Jacobsen committed Dec 30, 2023
commit 0ff30b2182cba73c4d4f5bfb418cb9b9ad94f597
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