mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 14:56:42 -04:00
Revert "change monthly_active_users table to be a single column"
This reverts commit ec716a35b2
.
This commit is contained in:
parent
ec716a35b2
commit
165e067033
3 changed files with 13 additions and 7 deletions
|
@ -38,18 +38,22 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
|||
return count
|
||||
return self.runInteraction("count_users", _count_users)
|
||||
|
||||
def insert_monthly_active_user(self, user_id):
|
||||
def upsert_monthly_active_user(self, user_id):
|
||||
"""
|
||||
Updates or inserts monthly active user member
|
||||
Arguments:
|
||||
user_id (str): user to add/update
|
||||
"""
|
||||
return self._simple_insert(
|
||||
return self._simple_upsert(
|
||||
desc="upsert_monthly_active_user",
|
||||
table="monthly_active_users",
|
||||
values={
|
||||
keyvalues={
|
||||
"user_id": user_id,
|
||||
},
|
||||
values={
|
||||
"timestamp": int(self._clock.time_msec()),
|
||||
},
|
||||
lock=False,
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue