mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 01:38:50 -03:30
Make db password optional for wsrelay (#15046)
* Make db password optional for wsrelay * Change DB setting copy to deepcopy safer than copy() Co-Authored-By: Jeff Bradberry <685957+jbradberry@users.noreply.github.com> --------- Co-authored-by: Jeff Bradberry <685957+jbradberry@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import psycopg
|
||||
import select
|
||||
from copy import deepcopy
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
@@ -94,8 +95,8 @@ class PubSub(object):
|
||||
|
||||
|
||||
def create_listener_connection():
|
||||
conf = settings.DATABASES['default'].copy()
|
||||
conf['OPTIONS'] = conf.get('OPTIONS', {}).copy()
|
||||
conf = deepcopy(settings.DATABASES['default'])
|
||||
conf['OPTIONS'] = deepcopy(conf.get('OPTIONS', {}))
|
||||
# Modify the application name to distinguish from other connections the process might use
|
||||
conf['OPTIONS']['application_name'] = get_application_name(settings.CLUSTER_HOST_ID, function='listener')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user