Skip to content

Commit

Permalink
[patch] Loop restart fix if there are too many search commands of sta…
Browse files Browse the repository at this point in the history
…lled or bad torrents
  • Loading branch information
Feramance committed Oct 23, 2023
1 parent 10ed2b2 commit 53d1a01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -3763,14 +3763,16 @@ 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:
elif self.arr_db_query_commands_count() == 0 or datetime.now() > (
(timer + loop_timer) * 4
):
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):
self.refresh_download_queue()
self.force_grab()
raise RestartLoopException
Expand Down

0 comments on commit 53d1a01

Please sign in to comment.