Skip to content

Commit

Permalink
[build] Max retries exceeded handling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Aug 29, 2023
1 parent 4275b1a commit e23672a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def __init__(
if not self.completed_folder.exists() and not SEARCH_ONLY:
try:
self.completed_folder.mkdir(parents=True, exist_ok=True)
except:
except BaseException:
self.logger.warning(
"%s completed folder is a soft requirement. The specified folder does not exist %s and cannot be created. This will disable all file monitoring.",
self._name,
self.completed_folder
self.completed_folder,
)
self.apikey = CONFIG.get_or_raise(f"{name}.APIKey")
self.re_search = CONFIG.get(f"{name}.ReSearch", fallback=False)
Expand Down Expand Up @@ -471,7 +471,7 @@ def __init__(
self.search_api_command = "MissingEpisodeSearch"

self.search_setup_completed = False
self.model_arr_file: EpisodesModel | MoviesModel | MoviesModelv5= None
self.model_arr_file: EpisodesModel | MoviesModel | MoviesModelv5 = None
self.model_arr_series_file: SeriesModel = None
self.model_arr_movies_file: MoviesMetadataModel = None

Expand Down Expand Up @@ -1402,10 +1402,7 @@ def db_update(self):
self.model_arr_file.select(self.model_arr_file)
.join(
self.model_arr_movies_file,
on=(
self.model_arr_file.MovieMetadataId
== self.model_arr_movies_file.Id
),
on=(self.model_arr_file.MovieMetadataId == self.model_arr_movies_file.Id),
)
.where(self.model_arr_movies_file.Year == self.search_current_year)
.order_by(self.model_arr_file.Added.desc())
Expand Down Expand Up @@ -3561,11 +3558,11 @@ def process_torrents(self):
self.logger.error("The qBittorrent API returned an unexpected error")
self.logger.debug("Unexpected Missing Requirements from qBitTorrent", exc_info=e)
raise DelayLoopException(length=300, type="qbit")
except DelayLoopException:
raise
except qbittorrentapi.exceptions.APIConnectionError as e:
self.logger.warning(e)
self.logger.warning("Max retries exceeded")
raise DelayLoopException(length=300, type="qbit")
except DelayLoopException:
raise
except KeyboardInterrupt:
self.logger.hnotice("Detected Ctrl+C - Terminating process")
sys.exit(0)
Expand Down

0 comments on commit e23672a

Please sign in to comment.