Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient.

This commit is contained in:
David Baker 2015-12-10 16:26:08 +00:00
parent 86345a511f
commit 21f135ba76
4 changed files with 81 additions and 1 deletions

View file

@ -291,6 +291,18 @@ class RegistrationStore(SQLBaseStore):
defer.returnValue(ret['user_id'])
defer.returnValue(None)
@defer.inlineCallbacks
def get_all_user_ids(self):
"""Returns all user ids registered on this homeserver"""
return self.runInteraction(
"get_all_user_ids",
self._get_all_user_ids_txn
)
def _get_all_user_ids_txn(self, txn):
txn.execute("SELECT name from users")
return [r[0] for r in txn.fetchall()]
@defer.inlineCallbacks
def count_all_users(self):
"""Counts all users registered on the homeserver."""