🎨 SourceIterator can yield addtitional data
SourceIterator-s can yield a game and a tuple of additional data. This data will be passed to the Store, Pipeline and Managers.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from urllib3.exceptions import SSLError
|
||||
|
||||
from src.game import Game
|
||||
from src.store.managers.async_manager import AsyncManager
|
||||
from src.store.managers.steam_api_manager import SteamAPIManager
|
||||
@@ -8,9 +10,9 @@ class SGDBManager(AsyncManager):
|
||||
"""Manager in charge of downloading a game's cover from steamgriddb"""
|
||||
|
||||
run_after = set((SteamAPIManager,))
|
||||
retryable_on = set((HTTPError,))
|
||||
retryable_on = set((HTTPError, SSLError))
|
||||
|
||||
def manager_logic(self, game: Game) -> None:
|
||||
def manager_logic(self, game: Game, _additional_data: tuple) -> None:
|
||||
try:
|
||||
sgdb = SGDBHelper()
|
||||
sgdb.conditionaly_update_cover(game)
|
||||
|
||||
Reference in New Issue
Block a user