0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 20:43:52 +01:00

Add some docstrings

This commit is contained in:
Daniel Wagner-Hall 2015-09-22 13:47:40 +01:00
parent b6e0303c83
commit 6d59ffe1ce
2 changed files with 4 additions and 0 deletions

View file

@ -128,6 +128,9 @@ class DataStore(RoomMemberStore, RoomStore,
@defer.inlineCallbacks
def count_daily_users(self):
"""
Counts the number of users who used this homeserver in the last 24 hours.
"""
def _count_users(txn):
txn.execute(
"SELECT COUNT(DISTINCT user_id) AS users"

View file

@ -292,6 +292,7 @@ class RegistrationStore(SQLBaseStore):
@defer.inlineCallbacks
def count_all_users(self):
"""Counts all users registered on the homeserver."""
def _count_users(txn):
txn.execute("SELECT COUNT(*) AS users FROM users")
rows = self.cursor_to_dict(txn)