mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-19 08:24:25 +01:00
No need to cast in count_daily_users
This commit is contained in:
parent
a32d2548d9
commit
0f890f477e
1 changed files with 2 additions and 2 deletions
|
@ -250,7 +250,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
Counts the number of users who used this homeserver in the last 24 hours.
|
Counts the number of users who used this homeserver in the last 24 hours.
|
||||||
"""
|
"""
|
||||||
def _count_users(txn):
|
def _count_users(txn):
|
||||||
yesterday = int(self._clock.time_msec()) - (1000 * 60 * 60 * 24),
|
yesterday = int(self._clock.time_msec()) - (1000 * 60 * 60 * 24)
|
||||||
|
|
||||||
sql = """
|
sql = """
|
||||||
SELECT COALESCE(count(*), 0) FROM (
|
SELECT COALESCE(count(*), 0) FROM (
|
||||||
|
@ -260,7 +260,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
) u
|
) u
|
||||||
"""
|
"""
|
||||||
|
|
||||||
txn.execute(sql, (str(yesterday),))
|
txn.execute(sql, (yesterday,))
|
||||||
count, = txn.fetchone()
|
count, = txn.fetchone()
|
||||||
return count
|
return count
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue