mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
AWX code changes for rsyslog decoupling (#13222)
* add management command and logging for new daemon * switch tasks over to calling pg_notify * add daemon to docker-compose and supervisor * renamed handle_setting_changes and moved notify call * removed initial rsyslog configure from dispatcher * add logging and clear cache before reconfigure * add notify to delete * moved pg_notify to own function * update tests impacted by rsyslog change * changed over to new pg_notify method Signed-off-by: Jessica Mack <jmack@redhat.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import urllib.parse as urlparse
|
||||
from django.conf import settings
|
||||
|
||||
from awx.main.utils.reload import supervisor_service_command
|
||||
from awx.main.dispatch import pg_bus_conn
|
||||
|
||||
|
||||
def construct_rsyslog_conf_template(settings=settings):
|
||||
@@ -124,3 +125,8 @@ def reconfigure_rsyslog():
|
||||
f.write(tmpl + '\n')
|
||||
shutil.move(path, '/var/lib/awx/rsyslog/rsyslog.conf')
|
||||
supervisor_service_command(command='restart', service='awx-rsyslogd')
|
||||
|
||||
|
||||
def send_pg_notify(channel: str, payload: str) -> None:
|
||||
with pg_bus_conn() as conn:
|
||||
conn.notify(channel, payload)
|
||||
|
||||
Reference in New Issue
Block a user