Skip to content

Commit

Permalink
LISTENER_DATABASES clobbers DATABASES OPTIONS (ansible#15306)
Browse files Browse the repository at this point in the history
Do not overwrite DATABASES OPTIONS with LISTENER_DATABASES
  • Loading branch information
jamesmarshall24 authored and djyasin committed Sep 11, 2024
1 parent b1b4e17 commit afd5f7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion awx/main/dispatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def create_listener_connection():

# Apply overrides specifically for the listener connection
for k, v in settings.LISTENER_DATABASES.get('default', {}).items():
conf[k] = v
if k != 'OPTIONS':
conf[k] = v
for k, v in settings.LISTENER_DATABASES.get('default', {}).get('OPTIONS', {}).items():
conf['OPTIONS'][k] = v

Expand Down
3 changes: 2 additions & 1 deletion awx/main/wsrelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ async def run(self):
database_conf['OPTIONS'] = deepcopy(database_conf.get('OPTIONS', {}))

for k, v in settings.LISTENER_DATABASES.get('default', {}).items():
database_conf[k] = v
if k != 'OPTIONS':
database_conf[k] = v
for k, v in settings.LISTENER_DATABASES.get('default', {}).get('OPTIONS', {}).items():
database_conf['OPTIONS'][k] = v

Expand Down

0 comments on commit afd5f7b

Please sign in to comment.