mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-15 22:42:23 +01:00
Catch stats-reporting errors
This commit is contained in:
parent
eb011cd99b
commit
b6e0303c83
1 changed files with 7 additions and 4 deletions
|
@ -701,10 +701,13 @@ def run(hs):
|
||||||
stats["daily_messages"] = daily_messages
|
stats["daily_messages"] = daily_messages
|
||||||
|
|
||||||
logger.info("Reporting stats to matrix.org: %s" % (stats,))
|
logger.info("Reporting stats to matrix.org: %s" % (stats,))
|
||||||
hs.get_simple_http_client().put_json(
|
try:
|
||||||
"https://matrix.org/report-usage-stats/push",
|
yield hs.get_simple_http_client().put_json(
|
||||||
stats
|
"https://matrix.org/report-usage-stats/push",
|
||||||
)
|
stats
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
logger.warn("Error reporting stats: %s", e)
|
||||||
|
|
||||||
if hs.config.report_stats:
|
if hs.config.report_stats:
|
||||||
phone_home_task = task.LoopingCall(phone_stats_home)
|
phone_home_task = task.LoopingCall(phone_stats_home)
|
||||||
|
|
Loading…
Reference in a new issue