Skip to content

Commit

Permalink
Adopt LISTENER_DATABASES setting
Browse files Browse the repository at this point in the history
Related to ansible/awx#14755

move TCP keepalive to pg_listener specific db setting
  • Loading branch information
TheRealHaoLiu committed Jan 16, 2024
1 parent 7b95f03 commit c0c3922
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions roles/installer/templates/settings/credentials.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ DATABASES = {
{% if awx_postgres_sslmode in ['verify-ca', 'verify-full'] %}
'sslrootcert': '{{ ca_trust_bundle }}',
{% endif %}
},
}
}

LISTENER_DATABASES = {
'default': {
'OPTIONS': {
{% if postgres_keepalives %}
'keepalives': 1,
'keepalives_idle': {{ postgres_keepalives_idle }},
'keepalives_interval': {{ postgres_keepalives_interval }},
'keepalives_count': {{ postgres_keepalives_count }},
'keepalives': 1,
'keepalives_idle': {{ postgres_keepalives_idle }},
'keepalives_interval': {{ postgres_keepalives_interval }},
'keepalives_count': {{ postgres_keepalives_count }},
{% else %}
'keepalives': 0,
'keepalives': 0,
{% endif %}
},
}
Expand Down

0 comments on commit c0c3922

Please sign in to comment.