Skip to content

Commit

Permalink
Merge pull request #1033 from rommapp/fix/scheduled-switch-title-db-run
Browse files Browse the repository at this point in the history
fix: Initialize context on scheduled task
  • Loading branch information
adamantike authored Jul 27, 2024
2 parents 9b52a4b + fe5759f commit 66f4c0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/tasks/update_switch_titledb.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from handler.redis_handler import async_cache
from logger.logger import log
from tasks.tasks import RemoteFilePullTask
from utils.context import initialize_context
from utils.iterators import batched

SWITCH_TITLEDB_INDEX_KEY: Final = "romm:switch_titledb"
Expand All @@ -24,6 +25,7 @@ def __init__(self):
url="https://raw.githubusercontent.com/blawar/titledb/master/US.en.json",
)

@initialize_context()
async def run(self, force: bool = False) -> None:
content = await super().run(force)
if content is None:
Expand Down

0 comments on commit 66f4c0a

Please sign in to comment.