summary refs log tree commit diff
path: root/synapse/storage/receipts.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-04-11 12:58:55 +0100
committerDavid Baker <dbkr@users.noreply.github.com>2016-04-11 12:58:55 +0100
commit2547dffccc2f2ead7e0d35dafd6da5d468e6d1d8 (patch)
tree76c9b510bdb25556553c0cbfa7072e36d11f7e75 /synapse/storage/receipts.py
parentPEP8 (diff)
parentRun unsafe proces in a loop until we've caught up (diff)
downloadsynapse-2547dffccc2f2ead7e0d35dafd6da5d468e6d1d8.tar.xz
Merge pull request #705 from matrix-org/dbkr/pushers_use_event_actions
Change pushers to use the event_actions table
Diffstat (limited to 'synapse/storage/receipts.py')
-rw-r--r--synapse/storage/receipts.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/storage/receipts.py b/synapse/storage/receipts.py
index 7fdd84bbdc..3b8805593e 100644
--- a/synapse/storage/receipts.py
+++ b/synapse/storage/receipts.py
@@ -390,16 +390,19 @@ class ReceiptsStore(SQLBaseStore):
             }
         )
 
-    def get_all_updated_receipts(self, last_id, current_id, limit):
+    def get_all_updated_receipts(self, last_id, current_id, limit=None):
         def get_all_updated_receipts_txn(txn):
             sql = (
                 "SELECT stream_id, room_id, receipt_type, user_id, event_id, data"
                 " FROM receipts_linearized"
                 " WHERE ? < stream_id AND stream_id <= ?"
                 " ORDER BY stream_id ASC"
-                " LIMIT ?"
             )
-            txn.execute(sql, (last_id, current_id, limit))
+            args = [last_id, current_id]
+            if limit is not None:
+                sql += " LIMIT ?"
+                args.append(limit)
+            txn.execute(sql, args)
 
             return txn.fetchall()
         return self.runInteraction(