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,7 +86,8 @@ def update_fts_columns(conn: psycopg2.extensions.connection) -> int:
|
|||||||
(message_id,),
|
(message_id,),
|
||||||
)
|
)
|
||||||
ids.append(id)
|
ids.append(id)
|
||||||
cursor.execute("DELETE FROM fts_update_log WHERE id = ANY(%s)", (ids,))
|
if ids:
|
||||||
|
cursor.execute("DELETE FROM fts_update_log WHERE id = ANY(%s)", (ids,))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
return len(ids)
|
return len(ids)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user