summary refs log tree commit diff
path: root/synapse/util/wheel_timer.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-19 11:26:32 +0000
committerErik Johnston <erik@matrix.org>2016-02-19 11:26:32 +0000
commitea7786e8cac34d11b248d89fc51b33f1ba247038 (patch)
tree048bfd6d659529f1f55f4d1564cd2cb76a347193 /synapse/util/wheel_timer.py
parentMerge pull request #582 from matrix-org/erikj/presence (diff)
parentDon't set currently_active for remote presence (diff)
downloadsynapse-ea7786e8cac34d11b248d89fc51b33f1ba247038.tar.xz
Merge pull request #586 from matrix-org/erikj/presence
Fix presence `currently_active`. Add presence metrics.
Diffstat (limited to 'synapse/util/wheel_timer.py')
-rw-r--r--synapse/util/wheel_timer.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/util/wheel_timer.py b/synapse/util/wheel_timer.py
index 2c9f957616..7412fc57a4 100644
--- a/synapse/util/wheel_timer.py
+++ b/synapse/util/wheel_timer.py
@@ -89,3 +89,9 @@ class WheelTimer(object):
             ret.extend(self.entries.pop(0).queue)
 
         return ret
+
+    def __len__(self):
+        l = 0
+        for entry in self.entries:
+            l += len(entry.queue)
+        return l