diff options
author | Erik Johnston <erik@matrix.org> | 2018-04-12 11:18:19 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-04-12 11:18:19 +0100 |
commit | f67e906e189cb528cab18cb5190be352dcc8914b (patch) | |
tree | 068855c9368538c37ba3c161a5b291c299db7a0e /synapse/federation/transaction_queue.py | |
parent | Fix tests (diff) | |
download | synapse-f67e906e189cb528cab18cb5190be352dcc8914b.tar.xz |
Set all metrics at the same time
Diffstat (limited to 'synapse/federation/transaction_queue.py')
-rw-r--r-- | synapse/federation/transaction_queue.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py index 1c466cbded..963d938edd 100644 --- a/synapse/federation/transaction_queue.py +++ b/synapse/federation/transaction_queue.py @@ -233,16 +233,10 @@ class TransactionQueue(object): consumeErrors=True )) - events_processed_counter.inc_by(len(events)) - yield self.store.update_federation_out_pos( "events", next_token ) - synapse.metrics.event_processing_positions.set( - next_token, "federation_sender", - ) - if events: now = self.clock.time_msec() ts = yield self.store.get_received_ts(events[-1].event_id) @@ -254,6 +248,12 @@ class TransactionQueue(object): ts, "federation_sender", ) + events_processed_counter.inc_by(len(events)) + + synapse.metrics.event_processing_positions.set( + next_token, "federation_sender", + ) + finally: self._is_processing = False |