mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
make rsyslog service restarts a bit less noisy
This commit is contained in:
@@ -29,11 +29,12 @@ def supervisor_service_command(command, service='*', communicate=True):
|
|||||||
restart_stdout, restart_err = supervisor_process.communicate()
|
restart_stdout, restart_err = supervisor_process.communicate()
|
||||||
restart_code = supervisor_process.returncode
|
restart_code = supervisor_process.returncode
|
||||||
if restart_code or restart_err:
|
if restart_code or restart_err:
|
||||||
logger.error('supervisorctl {} errored with exit code `{}`, stdout:\n{}stderr:\n{}'.format(
|
logger.error('supervisorctl {} {} errored with exit code `{}`, stdout:\n{}stderr:\n{}'.format(
|
||||||
command, restart_code, restart_stdout.strip(), restart_err.strip()))
|
command, service, restart_code, restart_stdout.strip(), restart_err.strip()))
|
||||||
else:
|
else:
|
||||||
logger.info('supervisorctl {} finished, stdout:\n{}'.format(
|
logger.debug(
|
||||||
command, restart_stdout.strip()))
|
'supervisorctl {} {} succeeded'.format(command, service)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
logger.info('Submitted supervisorctl {} command, not waiting for result'.format(command))
|
logger.info('Submitted supervisorctl {} command, not waiting for result'.format(command))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user