Explorar o código

Adds stats for eventlet pool

Mher Movsisyan %!s(int64=11) %!d(string=hai) anos
pai
achega
0f111b1834
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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(),
+        }