Merge pull request #3894 from matrix-org/hs/phone_home_py_version

Add python_version phone home stat
pull/3485/merge
Amber Brown 2018-09-19 02:40:04 +10:00 committed by GitHub
commit c600886d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

1
changelog.d/3894.feature Normal file
View File

@ -0,0 +1 @@
Report "python_version" in the phone home stats

View File

@ -457,6 +457,10 @@ def run(hs):
stats["homeserver"] = hs.config.server_name
stats["timestamp"] = now
stats["uptime_seconds"] = uptime
version = sys.version_info
stats["python_version"] = "{}.{}.{}".format(
version.major, version.minor, version.micro
)
stats["total_users"] = yield hs.get_datastore().count_all_users()
total_nonbridged_users = yield hs.get_datastore().count_nonbridged_users()