diff options
author | Neil Johnson <neil@fragile.org.uk> | 2018-04-25 17:37:29 +0100 |
---|---|---|
committer | Neil Johnson <neil@fragile.org.uk> | 2018-04-25 17:37:29 +0100 |
commit | 617bf40924bc8d627734eb2fb25a9f3980ede5d5 (patch) | |
tree | b81707cac2d1485f81ad59f415845198626a82fb /synapse/app | |
parent | ignore atom editor python ide files (diff) | |
download | synapse-617bf40924bc8d627734eb2fb25a9f3980ede5d5.tar.xz |
Generate user daily stats
Diffstat (limited to 'synapse/app')
-rwxr-xr-x | synapse/app/homeserver.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index a0e465d644..808567365a 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -473,6 +473,9 @@ def run(hs): " changes across releases." ) + def generate_user_daily_visit_stats(): + hs.get_datastore().generate_user_daily_visits() + if hs.config.report_stats: logger.info("Scheduling stats reporting for 3 hour intervals") clock.looping_call(phone_stats_home, 3 * 60 * 60 * 1000) @@ -485,6 +488,9 @@ def run(hs): # be quite busy the first few minutes clock.call_later(5 * 60, phone_stats_home) + clock.looping_call(generate_user_daily_visit_stats, 60 * 1000) + clock.call_later(5 * 60, generate_user_daily_visit_stats) + if hs.config.daemonize and hs.config.print_pidfile: print (hs.config.pid_file) |