Annotate process_fts_updates.

This commit is contained in:
Tim Abbott 2016-10-15 22:38:42 -07:00
parent 37722fa650
commit 458e455b75
1 changed files with 2 additions and 0 deletions

View File

@ -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]