Browse Source

Clean last functions from the real anti-stalling fix

tags/2.3.0Alpha1
Safihre 8 years ago
parent
commit
848721da84
  1. 14
      sabnzbd/nzbqueue.py
  2. 5
      sabnzbd/nzbstuff.py

14
sabnzbd/nzbqueue.py

@ -854,19 +854,11 @@ class NzbQueue(object):
ArticleCache.do.purge_articles(nzo.saved_articles)
def stop_idle_jobs(self):
""" Detect jobs that have zero files left or are stalled
and send them to post-processing
"""
# Only active servers that are not on time-out
nr_servers = len([server for server in sabnzbd.downloader.Downloader.do.servers if server.active])
""" Detect jobs that have zero files left and send them to post processing """
empty = []
for nzo in self.__nzo_list:
if not nzo.futuretype and nzo.status not in (Status.PAUSED, Status.GRABBING):
# Finished, but not yet ended
if not nzo.files:
empty.append(nzo)
continue
if not nzo.futuretype and not nzo.files and nzo.status not in (Status.PAUSED, Status.GRABBING):
empty.append(nzo)
for nzo in empty:
self.end_job(nzo)

5
sabnzbd/nzbstuff.py

@ -92,11 +92,6 @@ class TryList(object):
if server not in self.try_list:
self.try_list.append(server)
def try_list_size(self):
""" How many servers are listed as tried """
with TRYLIST_LOCK:
return len(self.try_list)
def reset_try_list(self):
""" Clean the list """
with TRYLIST_LOCK:

Loading…
Cancel
Save