Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6336 from matrix-org/erikj/fix_phone_home_stats
Browse files Browse the repository at this point in the history
* commit '01ba7b38a':
  Newsfile
  Fix phone home stats
  • Loading branch information
anoadragon453 committed Mar 16, 2020
2 parents 699d6fc + 01ba7b3 commit d732a7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/6336.misc
@@ -0,0 +1 @@
Remove the dependency on psutil and replace functionality with the stdlib `resource` module.
4 changes: 2 additions & 2 deletions synapse/app/homeserver.py
Expand Up @@ -636,15 +636,15 @@ def start_generate_monthly_active_users():

if hs.config.report_stats:
logger.info("Scheduling stats reporting for 3 hour intervals")
clock.looping_call(start_phone_stats_home, 3 * 60 * 60 * 1000, hs, stats)
clock.looping_call(start_phone_stats_home, 3 * 60 * 60 * 1000)

# We need to defer this init for the cases that we daemonize
# otherwise the process ID we get is that of the non-daemon process
clock.call_later(0, performance_stats_init)

# We wait 5 minutes to send the first set of stats as the server can
# be quite busy the first few minutes
clock.call_later(5 * 60, start_phone_stats_home, hs, stats)
clock.call_later(5 * 60, start_phone_stats_home)

_base.start_reactor(
"synapse-homeserver",
Expand Down

0 comments on commit d732a7a

Please sign in to comment.