mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 08:00:53 +00:00
actually close conn
This commit is contained in:
parent
cefac79c10
commit
fef7e58ac6
1 changed files with 8 additions and 4 deletions
|
@ -283,10 +283,14 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
GROUP BY user_id
|
||||
) u
|
||||
"""
|
||||
txn = self.db_conn.cursor()
|
||||
txn.execute(sql, (thirty_days_ago,))
|
||||
count, = txn.fetchone()
|
||||
return count
|
||||
try:
|
||||
txn = self.db_conn.cursor()
|
||||
txn.execute(sql, (thirty_days_ago,))
|
||||
count, = txn.fetchone()
|
||||
return count
|
||||
finally:
|
||||
txn.close()
|
||||
|
||||
|
||||
|
||||
def count_r30_users(self):
|
||||
|
|
Loading…
Reference in a new issue