浏览代码

Adds stats for eventlet pool

Mher Movsisyan 11 年之前
父节点
当前提交
0f111b1834
共有 1 个文件被更改,包括 7 次插入0 次删除
  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(),
+        }