13108: Add test for taskqueue
[arvados.git] / sdk / cwl / arvados_cwl / task_queue.py
index 7efb08aec28a3796f185db4cc2e351a8b6c8f48b..b9fd09807b452c1b06738ef1a7df72fd9dcc8708 100644 (file)
@@ -31,7 +31,7 @@ class TaskQueue(object):
                 try:
                     task()
                 except Exception as e:
-                    logger.exception("Unexpected error running task")
+                    logger.exception("Unhandled exception running task")
                     self.error = e
 
                 with self.lock:
@@ -49,7 +49,7 @@ class TaskQueue(object):
         try:
             # Drain queue
             while not self.task_queue.empty():
-                self.task_queue.get()
+                self.task_queue.get(True, .1)
         except Queue.Empty:
             pass