mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-13 02:16:28 +00:00
Readded modified process_fts_updates script
This commit is contained in:
@@ -76,14 +76,18 @@ if remote_postgres_host != '':
|
|||||||
postgres_password = ''
|
postgres_password = ''
|
||||||
if settings.DATABASES['default']['PASSWORD'] is not None:
|
if settings.DATABASES['default']['PASSWORD'] is not None:
|
||||||
postgres_password = "password='%s'" % settings.DATABASES['default']['PASSWORD']
|
postgres_password = "password='%s'" % settings.DATABASES['default']['PASSWORD']
|
||||||
postgres_user = "user='%s'" % settings.DATABASES['default']['USER']
|
postgres_user = 'user=zulip'
|
||||||
postgres_dbname = "dbname='%s'" % settings.DATABASES['default']['NAME']
|
if settings.DATABASES['default']['USER'] is not None:
|
||||||
|
postgres_user = "user='%s'" % settings.DATABASES['default']['USER']
|
||||||
|
postgres_dbname = 'dbname=zulip'
|
||||||
|
if settings.DATABASES['default']['NAME'] is not None:
|
||||||
|
postgres_dbname = "dbname='%s'" % settings.DATABASES['default']['NAME']
|
||||||
if settings.REMOTE_POSTGRES_SSLMODE != '':
|
if settings.REMOTE_POSTGRES_SSLMODE != '':
|
||||||
postgres_sslmode = settings.REMOTE_POSTGRES_SSLMODE
|
postgres_sslmode = settings.REMOTE_POSTGRES_SSLMODE
|
||||||
else:
|
else:
|
||||||
postgres_sslmode = 'verify-full'
|
postgres_sslmode = 'verify-full'
|
||||||
conn = psycopg2.connect("%s %s host='%s' %s connect_timeout=600 sslmode='%s'" % (
|
conn = psycopg2.connect("%s %s host='%s' %s connect_timeout=600 sslmode='%s'" % (
|
||||||
postgres_user, postgres_password, remote_postgres_host, postgres_dbname, postgres_sslmode))
|
postgres_user, postgres_password, remote_postgres_host, postgres_sslmode))
|
||||||
else:
|
else:
|
||||||
conn = psycopg2.connect("user=zulip")
|
conn = psycopg2.connect("user=zulip")
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
|||||||
Reference in New Issue
Block a user