Don't try to process events we already have a label for

pull/6310/head
Brendan Abolivier 2019-10-31 14:49:41 +00:00
parent 07cb38e965
commit 911b03ca31
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD
1 changed files with 2 additions and 1 deletions

View File

@ -518,7 +518,8 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore):
txn.execute(
"""
SELECT event_id, json FROM event_json
WHERE event_id > ?
LEFT JOIN event_labels USING (event_id)
WHERE event_id > ? AND label IS NULL
LIMIT ?
""",
(last_event_id, batch_size)