Skip to content

Commit

Permalink
remove players who fall out of legends
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Aug 26, 2024
1 parent 99d7ac9 commit 908acf2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bot/legends/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ async def main():
time_inside = time.time()

all_tags_to_track = await db_client.player_stats.distinct("tag", filter={"league" : "Legend League"})
tag_set = set(all_tags_to_track)
keys_to_remove = [key for key in LEGENDS_CACHE if key not in tag_set]
for key in keys_to_remove:
del LEGENDS_CACHE[key]

logger.info(f"{len(all_tags_to_track)} players to track")

split_size = 50_000
Expand Down

0 comments on commit 908acf2

Please sign in to comment.