From 48f062162edce4d13c88cc6cc1c917aedf9857bf Mon Sep 17 00:00:00 2001 From: Feramance Date: Wed, 25 Oct 2023 15:42:21 +0200 Subject: [PATCH] [build] Loop fix and increased restart delay --- qBitrr/arss.py | 9 ++------- qBitrr/main.py | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/qBitrr/arss.py b/qBitrr/arss.py index 419ca620..befef5e1 100755 --- a/qBitrr/arss.py +++ b/qBitrr/arss.py @@ -3763,16 +3763,11 @@ def run_search_loop(self) -> NoReturn: if years.index(self.search_current_year) != years_count - 1: years_index += 1 self.search_current_year = years[years_index] - elif self.arr_db_query_commands_count() == 0 or datetime.now() > ( - timer + (loop_timer * 4) - ): + else: self.refresh_download_queue() self.force_grab() raise RestartLoopException - elif ( - datetime.now() > (timer + loop_timer) - and self.arr_db_query_commands_count() == 0 - ) or datetime.now() > (timer + (loop_timer * 4)): + elif datetime.now() > (timer + loop_timer): self.refresh_download_queue() self.force_grab() raise RestartLoopException diff --git a/qBitrr/main.py b/qBitrr/main.py index db490d05..d3287d7b 100644 --- a/qBitrr/main.py +++ b/qBitrr/main.py @@ -221,6 +221,6 @@ def file_cleanup(): logger.info("Restarting processes", delay) cleanup() file_cleanup() - time.sleep(10) + time.sleep(60) run() loop_delay = datetime.now() + timedelta(hours=delay)