Browse Source

Do not crash if we can't save attributes, the job might be gone

tags/3.1.0RC3
Safihre 5 years ago
parent
commit
46ff7dd4e2
  1. 3
      sabnzbd/nzbqueue.py
  2. 2
      sabnzbd/nzbstuff.py

3
sabnzbd/nzbqueue.py

@ -776,10 +776,9 @@ class NzbQueue:
def end_job(self, nzo): def end_job(self, nzo):
""" Send NZO to the post-processing queue """ """ Send NZO to the post-processing queue """
logging.info("[%s] Ending job %s", caller_name(), nzo.final_name)
# Notify assembler to call postprocessor # Notify assembler to call postprocessor
if not nzo.deleted: if not nzo.deleted:
logging.info("[%s] Ending job %s", caller_name(), nzo.final_name)
nzo.deleted = True nzo.deleted = True
if nzo.precheck: if nzo.precheck:
nzo.save_to_disk() nzo.save_to_disk()

2
sabnzbd/nzbstuff.py

@ -1891,7 +1891,7 @@ class NzbObject(TryList):
for attrib in NzoAttributeSaver: for attrib in NzoAttributeSaver:
attribs[attrib] = getattr(self, attrib) attribs[attrib] = getattr(self, attrib)
logging.debug("Saving attributes %s for %s", attribs, self.final_name) logging.debug("Saving attributes %s for %s", attribs, self.final_name)
sabnzbd.save_data(attribs, ATTRIB_FILE, self.workpath) sabnzbd.save_data(attribs, ATTRIB_FILE, self.workpath, silent=True)
def load_attribs(self): def load_attribs(self):
""" Load saved attributes and return them to be parsed """ """ Load saved attributes and return them to be parsed """

Loading…
Cancel
Save