Add some docstrings
parent
b6e0303c83
commit
6d59ffe1ce
|
@ -128,6 +128,9 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def count_daily_users(self):
|
def count_daily_users(self):
|
||||||
|
"""
|
||||||
|
Counts the number of users who used this homeserver in the last 24 hours.
|
||||||
|
"""
|
||||||
def _count_users(txn):
|
def _count_users(txn):
|
||||||
txn.execute(
|
txn.execute(
|
||||||
"SELECT COUNT(DISTINCT user_id) AS users"
|
"SELECT COUNT(DISTINCT user_id) AS users"
|
||||||
|
|
|
@ -292,6 +292,7 @@ class RegistrationStore(SQLBaseStore):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def count_all_users(self):
|
def count_all_users(self):
|
||||||
|
"""Counts all users registered on the homeserver."""
|
||||||
def _count_users(txn):
|
def _count_users(txn):
|
||||||
txn.execute("SELECT COUNT(*) AS users FROM users")
|
txn.execute("SELECT COUNT(*) AS users FROM users")
|
||||||
rows = self.cursor_to_dict(txn)
|
rows = self.cursor_to_dict(txn)
|
||||||
|
|
Loading…
Reference in New Issue