diff options
author | Neil Johnson <neil@matrix.org> | 2018-05-16 10:09:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 10:09:24 +0000 |
commit | dc8930ea9ec0b34ada0e275b31c7e61eb12137e1 (patch) | |
tree | 4372d63f3b40c27f3700e552b01f69cfa95364d6 /synapse/app/homeserver.py | |
parent | Merge pull request #3213 from matrix-org/rav/consent_handler (diff) | |
parent | remove empty line (diff) | |
download | synapse-dc8930ea9ec0b34ada0e275b31c7e61eb12137e1.tar.xz |
Merge pull request #3163 from matrix-org/cohort_analytics
user visit data
Diffstat (limited to 'synapse/app/homeserver.py')
-rwxr-xr-x | synapse/app/homeserver.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 48594724c1..bceb21a8d5 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -484,6 +484,14 @@ def run(hs): " changes across releases." ) + def generate_user_daily_visit_stats(): + hs.get_datastore().generate_user_daily_visits() + + # Rather than update on per session basis, batch up the requests. + # If you increase the loop period, the accuracy of user_daily_visits + # table will decrease + clock.looping_call(generate_user_daily_visit_stats, 5 * 60 * 1000) + if hs.config.report_stats: logger.info("Scheduling stats reporting for 3 hour intervals") clock.looping_call(phone_stats_home, 3 * 60 * 60 * 1000) |