Logging is more efficient

This commit is contained in:
Paulus Schoutsen committed 2014-11-08 13:59:40 -08:00
1 parent c3c1383ae6
commit 1e136a2416
15 files changed
+136 -158

No files matched your search

+2 -1
View File
@@ -238,7 +238,8 @@ class ThreadPool(object):
self.work_queue.put(PriorityQueueItem(priority, job))
# check if our queue is getting too big
if self.work_queue.qsize() > self.busy_warning_limit:
if self.work_queue.qsize() > self.busy_warning_limit \
and self.busy_callback is not None:
# Increase limit we will issue next warning
self.busy_warning_limit *= 2