Browse Source

Adds stats for eventlet pool

Mher Movsisyan 11 years ago
parent
commit
0f111b1834
1 changed files with 7 additions and 0 deletions
  1. 7 0
      celery/concurrency/eventlet.py

+ 7 - 0
celery/concurrency/eventlet.py

@@ -142,3 +142,10 @@ class TaskPool(base.BasePool):
         self._quick_put(apply_target, target, args, kwargs,
                         callback, accept_callback,
                         self.getpid)
+
+    def _get_info(self):
+        return {
+            'max-concurrency': self.limit,
+            'free-threads': self._pool.free(),
+            'running-threads': self._pool.running(),
+        }