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
This commit is contained in:
Ryan Petrello
2020-04-13 11:44:00 -04:00
committed by Christian Adams
parent f70a76109c
commit bba680671b
+1 -1
View File
@@ -288,7 +288,7 @@ def handle_setting_changes(setting_keys):
setting.startswith('LOG_AGGREGATOR') setting.startswith('LOG_AGGREGATOR')
for setting in setting_keys for setting in setting_keys
]): ]):
reconfigure_rsyslog() connection.on_commit(reconfigure_rsyslog)
@task(queue='tower_broadcast_all') @task(queue='tower_broadcast_all')