mirror of https://github.com/zulip/zulip.git
check_postgres_replication_lag: Fix psql command line.
This allows the plugin to be run as users other than the "zulip" user, where the "zulip" database would not be the default.
This commit is contained in:
parent
5194485d74
commit
852af83d3c
|
@ -22,8 +22,8 @@ def report(state, msg):
|
|||
|
||||
def get_loc_over_ssh(host, func):
|
||||
try:
|
||||
return subprocess.check_output(['ssh', host, '-l', 'zulip',
|
||||
'psql -t -c "SELECT %s()"' % (func,)],
|
||||
return subprocess.check_output(['ssh', host,
|
||||
'psql zulip -t -c "SELECT %s()"' % (func,)],
|
||||
stderr=subprocess.STDOUT,
|
||||
universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
|
Loading…
Reference in New Issue