Cache get_presence storage

This commit is contained in:
Erik Johnston 2017-02-13 13:50:03 +00:00
parent 6bba80241c
commit 9e617cd4c2
3 changed files with 15 additions and 5 deletions

View file

@ -531,7 +531,7 @@ class PresenceHandler(object):
# There are things not in our in memory cache. Lets pull them out of
# the database.
res = yield self.store.get_presence_for_users(missing)
states.update({state.user_id: state for state in res})
states.update(res)
missing = [user_id for user_id, state in states.items() if not state]
if missing: