mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
process_fts_updates: Only DELETE if rows were processed.
This commit is contained in:
committed by
Tim Abbott
parent
eeb485f894
commit
f2f94d30fe
@@ -86,6 +86,7 @@ def update_fts_columns(conn: psycopg2.extensions.connection) -> int:
|
||||
(message_id,),
|
||||
)
|
||||
ids.append(id)
|
||||
if ids:
|
||||
cursor.execute("DELETE FROM fts_update_log WHERE id = ANY(%s)", (ids,))
|
||||
conn.commit()
|
||||
return len(ids)
|
||||
|
Reference in New Issue
Block a user