Skip to content

Commit

Permalink
active-matches: Prevent panics
Browse files Browse the repository at this point in the history
  • Loading branch information
raimannma committed Oct 10, 2024
1 parent 0449d6c commit ca348e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion active-matches-scraper/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ async fn main() {

info!("Currently having {} finished matches", match_count);

sleep(interval - start.elapsed()).await;
if start.elapsed() < interval - Duration::from_secs(2) {
sleep(interval - start.elapsed()).await;
}
}

info!("Uploading active matches to S3");
Expand Down

0 comments on commit ca348e7

Please sign in to comment.