mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 08:59:25 -05:00
pep8
This commit is contained in:
parent
617bf40924
commit
fb6015d0a6
@ -347,7 +347,6 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||||||
|
|
||||||
return self.runInteraction("count_r30_users", _count_r30_users)
|
return self.runInteraction("count_r30_users", _count_r30_users)
|
||||||
|
|
||||||
|
|
||||||
def generate_user_daily_visits(self):
|
def generate_user_daily_visits(self):
|
||||||
"""
|
"""
|
||||||
Generates daily visit data for use in cohort/ retention analysis
|
Generates daily visit data for use in cohort/ retention analysis
|
||||||
@ -390,14 +389,16 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||||||
txn.execute(sql, (yesterday_start_time,))
|
txn.execute(sql, (yesterday_start_time,))
|
||||||
|
|
||||||
sql = """
|
sql = """
|
||||||
INSERT INTO user_daily_visits (user_id, user_agent, device_id, timestamp)
|
INSERT INTO user_daily_visits (user_id. user_agent,
|
||||||
|
device_id, timestamp)
|
||||||
VALUES (?, ?, ?, ?)
|
VALUES (?, ?, ?, ?)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for row in txn:
|
for row in txn:
|
||||||
txn.execute(sql, (row + (yesterday_start_time,)))
|
txn.execute(sql, (row + (yesterday_start_time,)))
|
||||||
|
|
||||||
return self.runInteraction("generate_user_daily_visits", _generate_user_daily_visits)
|
return self.runInteraction("generate_user_daily_visits",
|
||||||
|
_generate_user_daily_visits)
|
||||||
|
|
||||||
def get_users(self):
|
def get_users(self):
|
||||||
"""Function to reterive a list of users in users table.
|
"""Function to reterive a list of users in users table.
|
||||||
|
Loading…
Reference in New Issue
Block a user