diff options
author | Jamie Matthews <jamie.matthews@gmail.com> | 2017-11-09 14:49:29 +0000 |
---|---|---|
committer | Jamie Matthews <jamie.matthews@gmail.com> | 2017-11-09 14:49:29 +0000 |
commit | 07b52bc196f596c7dce79c56136456dec3be4534 (patch) | |
tree | 99785817f6ba19812edf3f2ad5bfb4bc0b85405f | |
parent | 7bb27bb66322fc564e14005d29cb6fddd76a0ab6 (diff) | |
download | waitress-07b52bc196f596c7dce79c56136456dec3be4534.tar.gz |
Log warning when queue depth is greater than 0
-rw-r--r-- | waitress/task.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/waitress/task.py b/waitress/task.py index 4ce410c..13f9b21 100644 --- a/waitress/task.py +++ b/waitress/task.py @@ -108,6 +108,11 @@ class ThreadedTaskDispatcher(object): running -= 1 def add_task(self, task): + queue_depth = self.queue.qsize() + if queue_depth > 0: + self.logger.warning( + "Task queue depth is %d" % + queue_depth) try: task.defer() self.queue.put(task) |