0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-10-01 05:59:00 +02:00

Fix typos

This commit is contained in:
Erik Johnston 2016-06-06 15:44:41 +01:00
parent 377eb480ca
commit 96dc600579

View file

@ -283,8 +283,10 @@ class PresenceHandler(object):
"""Checks the presence of users that have timed out and updates as """Checks the presence of users that have timed out and updates as
appropriate. appropriate.
""" """
logger.info("Handling presence timeouts")
now = self.clock.time_msec() now = self.clock.time_msec()
try:
with Measure(self.clock, "presence_handle_timeouts"): with Measure(self.clock, "presence_handle_timeouts"):
# Fetch the list of users that *may* have timed out. Things may have # Fetch the list of users that *may* have timed out. Things may have
# changed since the timeout was set, so we won't necessarily have to # changed since the timeout was set, so we won't necessarily have to
@ -295,12 +297,12 @@ class PresenceHandler(object):
# process have expired. # process have expired.
expired_process_ids = [ expired_process_ids = [
process_id for process_id, last_update process_id for process_id, last_update
in self.external_process_last_update.items() in self.external_process_last_updated_ms.items()
if now - last_update > EXTERNAL_PROCESS_EXPIRY if now - last_update > EXTERNAL_PROCESS_EXPIRY
] ]
for process_id in expired_process_ids: for process_id in expired_process_ids:
users_to_check.update( users_to_check.update(
self.external_process_to_current_syncs.pop(process_id, ()) self.external_process_last_updated_ms.pop(process_id, ())
) )
self.external_process_last_update.pop(process_id) self.external_process_last_update.pop(process_id)
@ -316,11 +318,13 @@ class PresenceHandler(object):
changes = handle_timeouts( changes = handle_timeouts(
states, states,
is_mine_fn=self.is_mine_id, is_mine_fn=self.is_mine_id,
syncing_users=self.get_syncing_users(), syncing_user_ids=self.get_currently_syncing_users(),
now=now, now=now,
) )
preserve_fn(self._update_states)(changes) preserve_fn(self._update_states)(changes)
except:
logger.exception("Exception in _handle_timeouts loop")
@defer.inlineCallbacks @defer.inlineCallbacks
def bump_presence_active_time(self, user): def bump_presence_active_time(self, user):