diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:38 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:51 +0000 |
commit | 128cf2daf76e5b05a4e577b60ea406fdbb6986bf (patch) | |
tree | 1eeda21c7b8af0d08a57f46a2ec2c81f4fe3f326 /synapse/federation | |
parent | Option to serve metrics from their own localhost-only TCP port instead of mux... (diff) | |
download | synapse-128cf2daf76e5b05a4e577b60ea406fdbb6986bf.tar.xz |
Appease pep8
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/transaction_queue.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py index 99e386fa52..4dccd93d0e 100644 --- a/synapse/federation/transaction_queue.py +++ b/synapse/federation/transaction_queue.py @@ -57,7 +57,8 @@ class TransactionQueue(object): # done self.pending_transactions = {} - metrics.register_callback("pending_destinations", + metrics.register_callback( + "pending_destinations", lambda: len(self.pending_transactions), ) @@ -67,10 +68,12 @@ class TransactionQueue(object): # destination -> list of tuple(edu, deferred) self.pending_edus_by_dest = edus = {} - metrics.register_callback("pending_pdus", + metrics.register_callback( + "pending_pdus", lambda: sum(map(len, pdus.values())), ) - metrics.register_callback("pending_edus", + metrics.register_callback( + "pending_edus", lambda: sum(map(len, edus.values())), ) |