From c909a570a59ad83205665cb6cdb5f923ea8e8dd2 Mon Sep 17 00:00:00 2001 From: TeKrop Date: Tue, 27 Aug 2024 08:56:50 +0200 Subject: [PATCH] fix: fixed an issue with LastUpdatedAt cache refresh --- 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 e702a05..8c4f341 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 cf202ac..93a2630 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 = [