check_fts_update_log: Fix psycopg2 arguments.

* Fixes passing a string argument rather than an actual Python
  argument.
* Switches to hardcoding the database to connect to rather than the
  user, so this check can be run as an arbitrary user.
This commit is contained in:
Tim Abbott
2016-07-30 22:06:48 -07:00
parent c96722b124
commit 1d6ebd2b3d

View File

@@ -25,7 +25,7 @@ def report(state, num):
print("%s: %s rows in fts_update_log table" % (state, num))
exit(states[state])
conn = psycopg2.connect("user=zulip")
conn = psycopg2.connect(database="zulip")
cursor = conn.cursor()
cursor.execute("SELECT count(*) FROM fts_update_log")