1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-21 23:32:23 +00:00

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

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)