attempted fix for when dupechk bombs and/or error occurs in post-processing and hangs queue

This commit is contained in:
evilhero 2019-12-04 11:40:59 -05:00
parent 0a6b29b9f6
commit 63e6399dd4
1 changed files with 6 additions and 0 deletions

View File

@ -3111,6 +3111,7 @@ def postprocess_main(queue):
time.sleep(5)
elif mylar.APILOCK is False and queue.qsize() >= 1: #len(queue) > 1:
pp = None
item = queue.get(True)
logger.info('Now loading from post-processing queue: %s' % item)
if item == 'exit':
@ -3125,6 +3126,11 @@ def postprocess_main(queue):
pp = pprocess.post_process()
time.sleep(5) #arbitrary sleep to let the process attempt to finish pp'ing
if pp is not None:
if pp['mode'] == 'stop':
#reset the lock so any subsequent items can pp and not keep the queue locked up.
mylar.APILOCK = False
if mylar.APILOCK is True:
logger.info('Another item is post-processing still...')
time.sleep(15)