mirror of https://github.com/zulip/zulip.git
Annotate process_fts_updates.
This commit is contained in:
parent
37722fa650
commit
458e455b75
|
@ -31,6 +31,7 @@ import sys
|
|||
import os
|
||||
|
||||
def update_fts_columns(cursor):
|
||||
# type: (psycopg2.extensions.cursor) -> None
|
||||
cursor.execute("SELECT id, message_id FROM fts_update_log;")
|
||||
ids = []
|
||||
for (id, message_id) in cursor.fetchall():
|
||||
|
@ -48,6 +49,7 @@ def update_fts_columns(cursor):
|
|||
|
||||
|
||||
def am_master(cursor):
|
||||
# type: (psycopg2.extensions.cursor) -> bool
|
||||
cursor.execute("SELECT pg_is_in_recovery()")
|
||||
return not cursor.fetchall()[0][0]
|
||||
|
||||
|
|
Loading…
Reference in New Issue