diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-19 11:26:32 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-19 11:26:32 +0000 |
commit | ea7786e8cac34d11b248d89fc51b33f1ba247038 (patch) | |
tree | 048bfd6d659529f1f55f4d1564cd2cb76a347193 /synapse/util/wheel_timer.py | |
parent | Merge pull request #582 from matrix-org/erikj/presence (diff) | |
parent | Don't set currently_active for remote presence (diff) | |
download | synapse-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.py | 6 |
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 |