Cath all errors in threads
Makes in possible to empty the queue whatsoever happensmaster
parent
1644a409ef
commit
e2512dba0c
6
morss.py
6
morss.py
|
@ -534,7 +534,11 @@ def Gather(url, cachePath, options):
|
||||||
# set
|
# set
|
||||||
def runner(queue):
|
def runner(queue):
|
||||||
while True:
|
while True:
|
||||||
worker(*queue.get())
|
value = queue.get()
|
||||||
|
try:
|
||||||
|
worker(*value)
|
||||||
|
except:
|
||||||
|
log('random error in thread')
|
||||||
queue.task_done()
|
queue.task_done()
|
||||||
|
|
||||||
def worker(i, item):
|
def worker(i, item):
|
||||||
|
|
Loading…
Reference in New Issue