Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed an issue with LastUpdatedAt cache refresh #185

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/commands/check_and_update_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
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 = {
"GamemodesParser": GamemodesParser,
"HeroParser": HeroParser,
"HeroesParser": HeroesParser,
"HeroesStatsParser": HeroesStatsParser,
"LastUpdatedAtParser": LastUpdatedAtParser,
"MapsParser": MapsParser,
"NamecardParser": NamecardParser,
"PlayerParser": PlayerParser,
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down