1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Merge pull request #1586 from ansible/fix_missing_instance_group

Fix an issue where missing instance group would cause an error
This commit is contained in:
Matthew Jones 2018-04-26 09:21:37 -04:00 committed by GitHub
commit ccada295ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,7 +277,11 @@ class TaskManager():
def post_commit(): def post_commit():
task.websocket_emit_status(task.status) task.websocket_emit_status(task.status)
if task.status != 'failed': if task.status != 'failed':
task.start_celery_task(opts, error_callback=error_handler, success_callback=success_handler, queue=rampart_group.name) if rampart_group is not None:
actual_queue=rampart_group.name
else:
actual_queue=settings.CELERY_DEFAULT_QUEUE
task.start_celery_task(opts, error_callback=error_handler, success_callback=success_handler, queue=actual_queue)
connection.on_commit(post_commit) connection.on_commit(post_commit)