Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Commit

Permalink
🤒 Crawler: fix missing snapshots for new accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Sep 21, 2022
1 parent dfecb6f commit a0a820e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 39 deletions.
76 changes: 38 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/crawler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ impl Crawler {
};
let tanks_stats = tanks_stats
.into_iter()
.filter(|tank| Some(tank.last_battle_time) > account.last_battle_time)
.filter(|tank| match account.last_battle_time {
Some(last_battle_time) => tank.last_battle_time > last_battle_time,
_ => true,
})
.collect_vec();
let tank_snapshots = if !tanks_stats.is_empty() {
debug!(n_updated_tanks = tanks_stats.len());
Expand Down

0 comments on commit a0a820e

Please sign in to comment.