mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-27 04:59:23 -05:00
@log_function on PresenceStream's get_new_events_for_user()
This commit is contained in:
parent
52f1d3c886
commit
f5d2514fc0
@ -804,6 +804,7 @@ class PresenceEventSource(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@log_function
|
||||||
def get_new_events_for_user(self, user, from_key, limit):
|
def get_new_events_for_user(self, user, from_key, limit):
|
||||||
from_key = int(from_key)
|
from_key = int(from_key)
|
||||||
|
|
||||||
@ -816,7 +817,8 @@ class PresenceEventSource(object):
|
|||||||
# TODO(paul): use a DeferredList ? How to limit concurrency.
|
# TODO(paul): use a DeferredList ? How to limit concurrency.
|
||||||
for observed_user in cachemap.keys():
|
for observed_user in cachemap.keys():
|
||||||
cached = cachemap[observed_user]
|
cached = cachemap[observed_user]
|
||||||
if not (from_key < cached.serial):
|
|
||||||
|
if cached.serial <= from_key:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if (yield self.is_visible(observer_user, observed_user)):
|
if (yield self.is_visible(observer_user, observed_user)):
|
||||||
|
Loading…
Reference in New Issue
Block a user