Cath all errors in threads

Makes in possible to empty the queue whatsoever happens
master
pictuga 2013-12-01 19:45:00 +01:00
parent 1644a409ef
commit e2512dba0c
1 changed files with 5 additions and 1 deletions

View File

@ -534,7 +534,11 @@ def Gather(url, cachePath, options):
# set
def runner(queue):
while True:
worker(*queue.get())
value = queue.get()
try:
worker(*value)
except:
log('random error in thread')
queue.task_done()
def worker(i, item):