FIX: Fix for CDH looping endlessly when failing to locate item in downloader client history

This commit is contained in:
evilhero 2019-02-21 13:56:21 -05:00
parent 3803bf8d67
commit 59ae202789
3 changed files with 7 additions and 4 deletions

View File

@ -3171,7 +3171,9 @@ def nzb_monitor(queue):
logger.warn('There are no NZB Completed Download handlers enabled. Not sending item to completed download handling...') logger.warn('There are no NZB Completed Download handlers enabled. Not sending item to completed download handling...')
break break
if nzstat['status'] is False: if any([nzstat['status'] == 'file not found', nzstat['status'] == 'double-pp']):
logger.warn('Unable to complete post-processing call due to not finding file in the location provided. [%s]' % item)
elif nzstat['status'] is False:
logger.info('Could not find NZBID %s in the downloader\'s queue. I will requeue this item for post-processing...' % item['NZBID']) logger.info('Could not find NZBID %s in the downloader\'s queue. I will requeue this item for post-processing...' % item['NZBID'])
time.sleep(5) time.sleep(5)
mylar.NZB_QUEUE.put(item) mylar.NZB_QUEUE.put(item)

View File

@ -212,7 +212,7 @@ class NZBGet(object):
logger.fdebug('NZBGET Destination dir set to: %s' % destdir) logger.fdebug('NZBGET Destination dir set to: %s' % destdir)
else: else:
logger.warn('no file found where it should be @ %s - is there another script that moves things after completion ?' % hq[0]['DestDir']) logger.warn('no file found where it should be @ %s - is there another script that moves things after completion ?' % hq[0]['DestDir'])
return {'status': False} return {'status': 'file not found', 'failed': False}
if mylar.CONFIG.NZBGET_DIRECTORY is not None: if mylar.CONFIG.NZBGET_DIRECTORY is not None:
destdir2 = mylar.CONFIG.NZBGET_DIRECTORY destdir2 = mylar.CONFIG.NZBGET_DIRECTORY

View File

@ -136,7 +136,8 @@ class SABnzbd(object):
break break
else: else:
logger.info('no file found where it should be @ %s - is there another script that moves things after completion ?' % hq['storage']) logger.info('no file found where it should be @ %s - is there another script that moves things after completion ?' % hq['storage'])
break return {'status': 'file not found', 'failed': False}
elif hq['nzo_id'] == sendresponse and hq['status'] == 'Failed': elif hq['nzo_id'] == sendresponse and hq['status'] == 'Failed':
#get the stage / error message and see what we can do #get the stage / error message and see what we can do
stage = hq['stage_log'] stage = hq['stage_log']
@ -160,6 +161,6 @@ class SABnzbd(object):
except Exception as e: except Exception as e:
logger.warn('error %s' % e) logger.warn('error %s' % e)
break return {'status': False, 'failed': False}
return found return found