diff options
author | Erik Johnston <erik@matrix.org> | 2017-01-31 11:20:03 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-01-31 11:20:03 +0000 |
commit | d3169e8d28a4b7238256ff4d3151e3cc8feef0e1 (patch) | |
tree | f00f0bfc914a28c97f805bef702a558535b2d822 /synapse/storage/devices.py | |
parent | Fix clearing out old device list outbound pokes (diff) | |
download | synapse-d3169e8d28a4b7238256ff4d3151e3cc8feef0e1.tar.xz |
Only fetch with row ts and count > 1
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/devices.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py index e6fe67ee25..cccefdd3d2 100644 --- a/synapse/storage/devices.py +++ b/synapse/storage/devices.py @@ -552,9 +552,10 @@ class DeviceStore(SQLBaseStore): SELECT destination, user_id, max(stream_id) as stream_id FROM device_lists_outbound_pokes GROUP BY destination, user_id + HAVING min(ts) < ? AND count(*) > 1 """ - txn.execute(select_sql) + txn.execute(select_sql, (yesterday,)) rows = txn.fetchall() if not rows: |