From 875d5068239cf7e5e89f8365c4d7833a31226d80 Mon Sep 17 00:00:00 2001 From: Valentin Porchet Date: Tue, 27 Aug 2024 09:03:27 +0200 Subject: [PATCH] fix: fixed an issue with LastUpdatedAt cache refresh (#185) --- app/commands/check_and_update_cache.py | 5 +++-- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/commands/check_and_update_cache.py b/app/commands/check_and_update_cache.py index e702a053..8c4f341a 100644 --- a/app/commands/check_and_update_cache.py +++ b/app/commands/check_and_update_cache.py @@ -21,7 +21,7 @@ from app.parsers.player_parser import PlayerParser from app.parsers.player_stats_summary_parser import PlayerStatsSummaryParser from app.parsers.roles_parser import RolesParser -from app.parsers.search_data_parser import NamecardParser +from app.parsers.search_data_parser import LastUpdatedAtParser, NamecardParser # Mapping of parser class names to linked classes PARSER_CLASSES_MAPPING = { @@ -29,6 +29,7 @@ "HeroParser": HeroParser, "HeroesParser": HeroesParser, "HeroesStatsParser": HeroesStatsParser, + "LastUpdatedAtParser": LastUpdatedAtParser, "MapsParser": MapsParser, "NamecardParser": NamecardParser, "PlayerParser": PlayerParser, @@ -70,7 +71,7 @@ def get_request_parser_class(cache_key: str) -> tuple[type, dict]: cache_kwargs["locale"] = uri[1] if "Player" in parser_class_name: cache_kwargs["player_id"] = uri[3] - elif parser_class_name == "NamecardParser": + elif parser_class_name in ("LastUpdatedAtParser", "NamecardParser"): cache_kwargs["player_id"] = uri[4].replace("#", "-") elif parser_class_name == "HeroParser": cache_kwargs["hero_key"] = uri[3] diff --git a/pyproject.toml b/pyproject.toml index cf202acb..93a2630f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "overfast-api" -version = "2.35.0" +version = "2.35.1" description = "Overwatch API giving data about heroes, maps, and players statistics." license = {file = "LICENSE"} authors = [