Cath all errors in threads
Makes in possible to empty the queue whatsoever happens
This commit is contained in:
		
							
								
								
									
										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):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user