diff --git a/backend/exceptions/fs_exceptions.py b/backend/exceptions/fs_exceptions.py index a0706a965..2f6654b68 100644 --- a/backend/exceptions/fs_exceptions.py +++ b/backend/exceptions/fs_exceptions.py @@ -35,12 +35,3 @@ class RomAlreadyExistsException(Exception): def __repr__(self): return self.message - - -class SchedulerException(Exception): - def __init__(self, message: str): - self.message = message - super().__init__(self.message) - - def __repr__(self): - return self.message diff --git a/backend/tasks/exceptions.py b/backend/tasks/exceptions.py new file mode 100644 index 000000000..c5f3da58b --- /dev/null +++ b/backend/tasks/exceptions.py @@ -0,0 +1,7 @@ +class SchedulerException(Exception): + def __init__(self, message: str): + self.message = message + super().__init__(self.message) + + def __repr__(self): + return self.message diff --git a/backend/tasks/scan_library.py b/backend/tasks/scan_library.py index a93f7531b..9a07f68cf 100644 --- a/backend/tasks/scan_library.py +++ b/backend/tasks/scan_library.py @@ -1,7 +1,7 @@ from utils.redis import redis_connectable from logger.logger import log +from .exceptions import SchedulerException from . import scheduler -from utils.exceptions import SchedulerException async def run(): diff --git a/backend/tasks/update_switch_titledb.py b/backend/tasks/update_switch_titledb.py index 23124c530..30aa53203 100644 --- a/backend/tasks/update_switch_titledb.py +++ b/backend/tasks/update_switch_titledb.py @@ -5,8 +5,8 @@ from pathlib import Path from utils.redis import redis_connectable from logger.logger import log from typing import Final +from .exceptions import SchedulerException from . import scheduler -from utils.exceptions import SchedulerException RAW_URL: Final = "https://raw.githubusercontent.com/blawar/titledb/master/US.en.json" FIXTURE_FILE_PATH = ( @@ -16,8 +16,6 @@ FIXTURE_FILE_PATH = ( / "switch_titledb.json" ) -print(FIXTURE_FILE_PATH) - async def run(): log.info("Scheduled TitleDB update started...")