AC-1012 Open a new RabbitMQ connection for each forked process to prevent intermittent hang, update debug logging for job event callback.

This commit is contained in:
Chris Church
2014-02-07 17:12:46 -05:00
parent 8638f1e3d1
commit f02a93c333
3 changed files with 40 additions and 10 deletions

View File

@@ -379,7 +379,9 @@ class RunJob(BaseTask):
env['REST_API_TOKEN'] = job.task_auth_token or ''
if settings.BROKER_URL.startswith('amqp://'):
env['BROKER_URL'] = settings.BROKER_URL
if settings.DEBUG:
if getattr(settings, 'JOB_CALLBACK_DEBUG', False):
env['JOB_CALLBACK_DEBUG'] = '2'
elif settings.DEBUG:
env['JOB_CALLBACK_DEBUG'] = '1'
# When using Ansible >= 1.3, allow the inventory script to include host