diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-19 18:06:31 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-19 18:23:44 +0100 |
commit | afbf6b33fc22896df1048d8d8e1f8c790411126b (patch) | |
tree | f6f5244182b62d3fb543e258c1fe35826eb7431a | |
parent | Move defer.returnValue out of Measure (diff) | |
download | synapse-afbf6b33fc22896df1048d8d8e1f8c790411126b.tar.xz |
defer.returnValue must not be called within Measure
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/sync.py | 14 | ||||
-rw-r--r-- | synapse/notifier.py | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 0ee4ebe504..c8dfd02e7b 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -464,10 +464,10 @@ class SyncHandler(object): else: state = {} - defer.returnValue({ - (e.type, e.state_key): e - for e in sync_config.filter_collection.filter_room_state(state.values()) - }) + defer.returnValue({ + (e.type, e.state_key): e + for e in sync_config.filter_collection.filter_room_state(state.values()) + }) @defer.inlineCallbacks def unread_notifs_for_room_id(self, room_id, sync_config): @@ -485,9 +485,9 @@ class SyncHandler(object): ) defer.returnValue(notifs) - # There is no new information in this period, so your notification - # count is whatever it was last time. - defer.returnValue(None) + # There is no new information in this period, so your notification + # count is whatever it was last time. + defer.returnValue(None) @defer.inlineCallbacks def generate_sync_result(self, sync_config, since_token=None, full_state=False): diff --git a/synapse/notifier.py b/synapse/notifier.py index b1de293dbc..c48024096d 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -256,8 +256,7 @@ class Notifier(object): """Used to inform replication listeners that something has happend without waking up any of the normal user event streams""" with PreserveLoggingContext(): - with Measure(self.clock, "on_new_replication_data"): - self.notify_replication() + self.notify_replication() @defer.inlineCallbacks def wait_for_events(self, user_id, timeout, callback, room_ids=None, |