Merge pull request #6341 from egmar/fix-pgsql-connect-options

Jobs not running with external PostgreSQL database after PR #6034

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-03-19 13:55:54 +00:00
committed by GitHub

View File

@@ -75,7 +75,9 @@ def pg_bus_conn():
conn = psycopg2.connect(dbname=conf['NAME'],
host=conf['HOST'],
user=conf['USER'],
password=conf['PASSWORD'])
password=conf['PASSWORD'],
port=conf['PORT'],
**conf.get("OPTIONS", {}))
# Django connection.cursor().connection doesn't have autocommit=True on
conn.set_session(autocommit=True)
pubsub = PubSub(conn)