mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
Merge pull request #1391 from AlanCoding/crusty_setting
Remove setting corresponding to removed tests
This commit is contained in:
@@ -1263,10 +1263,6 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
|||||||
if not all(opts.values()):
|
if not all(opts.values()):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Sanity check: If we are running unit tests, then run synchronously.
|
|
||||||
if getattr(settings, 'CELERY_UNIT_TEST', False):
|
|
||||||
return self.start(None, None, **kwargs)
|
|
||||||
|
|
||||||
# Save the pending status, and inform the SocketIO listener.
|
# Save the pending status, and inform the SocketIO listener.
|
||||||
self.update_fields(start_args=json.dumps(kwargs), status='pending')
|
self.update_fields(start_args=json.dumps(kwargs), status='pending')
|
||||||
self.websocket_emit_status("pending")
|
self.websocket_emit_status("pending")
|
||||||
|
|||||||
@@ -153,8 +153,7 @@ class TaskManager():
|
|||||||
queue_name = queue_name[1 if len(queue_name) > 1 else 0]
|
queue_name = queue_name[1 if len(queue_name) > 1 else 0]
|
||||||
queues[queue_name] = active_tasks
|
queues[queue_name] = active_tasks
|
||||||
else:
|
else:
|
||||||
if not hasattr(settings, 'CELERY_UNIT_TEST'):
|
return (None, None)
|
||||||
return (None, None)
|
|
||||||
|
|
||||||
return (active_task_queues, queues)
|
return (active_task_queues, queues)
|
||||||
|
|
||||||
|
|||||||
@@ -1032,7 +1032,7 @@ class BaseTask(Task):
|
|||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(six.text_type('{} Final run hook errored.').format(instance.log_format))
|
logger.exception(six.text_type('{} Final run hook errored.').format(instance.log_format))
|
||||||
instance.websocket_emit_status(status)
|
instance.websocket_emit_status(status)
|
||||||
if status != 'successful' and not hasattr(settings, 'CELERY_UNIT_TEST'):
|
if status != 'successful':
|
||||||
# Raising an exception will mark the job as 'failed' in celery
|
# Raising an exception will mark the job as 'failed' in celery
|
||||||
# and will stop a task chain from continuing to execute
|
# and will stop a task chain from continuing to execute
|
||||||
if status == 'canceled':
|
if status == 'canceled':
|
||||||
|
|||||||
Reference in New Issue
Block a user