From bba680671bdb261cf58afec65e228038a7c1416e Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 8 Apr 2020 20:03:33 -0400 Subject: [PATCH] when writing the rsyslog config, do it post-commit there's a race condition if we do this pre-commit where the correct value isn't actually *persisted* to the database yet, and we end up saving the *prior* setting values --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index c69a0c7f78..95118c5751 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -288,7 +288,7 @@ def handle_setting_changes(setting_keys): setting.startswith('LOG_AGGREGATOR') for setting in setting_keys ]): - reconfigure_rsyslog() + connection.on_commit(reconfigure_rsyslog) @task(queue='tower_broadcast_all')