summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorNeil Johnson <neil@fragile.org.uk>2018-03-28 16:25:53 +0100
committerNeil Johnson <neil@fragile.org.uk>2018-03-28 16:25:53 +0100
commit241e4e86873d5880f564791e3768247fa55c3fa8 (patch)
tree73c397c4002df64ba05c6166c6ddc79a3d4b1516 /synapse/storage
parentbump schema version (diff)
downloadsynapse-241e4e86873d5880f564791e3768247fa55c3fa8.tar.xz
remove twisted deferral cruft
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index b651973c79..b2b85e266d 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -244,7 +244,6 @@ class DataStore(RoomMemberStore, RoomStore,
 
         return [UserPresenceState(**row) for row in rows]
 
-    @defer.inlineCallbacks
     def count_daily_users(self):
         """
         Counts the number of users who used this homeserver in the last 24 hours.
@@ -264,10 +263,9 @@ class DataStore(RoomMemberStore, RoomStore,
             count, = txn.fetchone()
             return count
 
-        ret = yield self.runInteraction("count_users", _count_users)
-        defer.returnValue(ret)
+        return self.runInteraction("count_users", _count_users)
+
 
-    @defer.inlineCallbacks
     def count_r30_users(self):
         """
         Counts the number of 30 day retained users, defined as:-
@@ -320,8 +318,7 @@ class DataStore(RoomMemberStore, RoomStore,
                 results["ALL"], = txn.fetchone()
             return results
 
-        ret = yield self.runInteraction("count_r30_users", _count_r30_users)
-        defer.returnValue(ret)
+        return self.runInteraction("count_r30_users", _count_r30_users)
 
     def get_users(self):
         """Function to reterive a list of users in users table.