defer.returnValue must not be called within Measure
This commit is contained in:
parent
37adde32dc
commit
afbf6b33fc
|
@ -464,10 +464,10 @@ class SyncHandler(object):
|
||||||
else:
|
else:
|
||||||
state = {}
|
state = {}
|
||||||
|
|
||||||
defer.returnValue({
|
defer.returnValue({
|
||||||
(e.type, e.state_key): e
|
(e.type, e.state_key): e
|
||||||
for e in sync_config.filter_collection.filter_room_state(state.values())
|
for e in sync_config.filter_collection.filter_room_state(state.values())
|
||||||
})
|
})
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def unread_notifs_for_room_id(self, room_id, sync_config):
|
def unread_notifs_for_room_id(self, room_id, sync_config):
|
||||||
|
@ -485,9 +485,9 @@ class SyncHandler(object):
|
||||||
)
|
)
|
||||||
defer.returnValue(notifs)
|
defer.returnValue(notifs)
|
||||||
|
|
||||||
# There is no new information in this period, so your notification
|
# There is no new information in this period, so your notification
|
||||||
# count is whatever it was last time.
|
# count is whatever it was last time.
|
||||||
defer.returnValue(None)
|
defer.returnValue(None)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def generate_sync_result(self, sync_config, since_token=None, full_state=False):
|
def generate_sync_result(self, sync_config, since_token=None, full_state=False):
|
||||||
|
|
|
@ -256,8 +256,7 @@ class Notifier(object):
|
||||||
"""Used to inform replication listeners that something has happend
|
"""Used to inform replication listeners that something has happend
|
||||||
without waking up any of the normal user event streams"""
|
without waking up any of the normal user event streams"""
|
||||||
with PreserveLoggingContext():
|
with PreserveLoggingContext():
|
||||||
with Measure(self.clock, "on_new_replication_data"):
|
self.notify_replication()
|
||||||
self.notify_replication()
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def wait_for_events(self, user_id, timeout, callback, room_ids=None,
|
def wait_for_events(self, user_id, timeout, callback, room_ids=None,
|
||||||
|
|
Loading…
Reference in New Issue