Generate user daily stats

This commit is contained in:
Neil Johnson 2018-04-25 17:37:29 +01:00
parent 48c01ae851
commit 617bf40924
6 changed files with 112 additions and 5 deletions

View file

@ -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)