Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix MAU invalidation due to missing yield #3746

Merged
merged 3 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/3746.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix MAU cache invalidation due to missing yield
3 changes: 2 additions & 1 deletion synapse/storage/monthly_active_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def _count_users(txn):
return count
return self.runInteraction("count_users", _count_users)

@defer.inlineCallbacks
def upsert_monthly_active_user(self, user_id):
"""
Updates or inserts monthly active user member
Expand All @@ -155,7 +156,7 @@ def upsert_monthly_active_user(self, user_id):
Deferred[bool]: True if a new entry was created, False if an
existing one was updated.
"""
is_insert = self._simple_upsert(
is_insert = yield self._simple_upsert(
desc="upsert_monthly_active_user",
table="monthly_active_users",
keyvalues={
Expand Down
Empty file.