mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 01:38:50 -03:30
corner-case verbose message for users who do not provide an inventory for their job
This commit is contained in:
@@ -123,12 +123,15 @@ class TaskManager():
|
|||||||
spawn_node.save()
|
spawn_node.save()
|
||||||
if job._resources_sufficient_for_launch():
|
if job._resources_sufficient_for_launch():
|
||||||
can_start = job.signal_start(**kv)
|
can_start = job.signal_start(**kv)
|
||||||
|
if not can_start:
|
||||||
|
job.job_explanation = _("Job spawned from workflow could not start because it "
|
||||||
|
"was not in the right state or required manual credentials")
|
||||||
else:
|
else:
|
||||||
can_start = False
|
can_start = False
|
||||||
|
job.job_explanation = _("Job spawned from workflow could not start because it "
|
||||||
|
"was missing a related resource such as project or inventory")
|
||||||
if not can_start:
|
if not can_start:
|
||||||
job.status = 'failed'
|
job.status = 'failed'
|
||||||
job.job_explanation = _("Job spawned from workflow could not start because it "
|
|
||||||
"was not in the right state or required manual credentials")
|
|
||||||
job.save(update_fields=['status', 'job_explanation'])
|
job.save(update_fields=['status', 'job_explanation'])
|
||||||
connection.on_commit(lambda: job.websocket_emit_status('failed'))
|
connection.on_commit(lambda: job.websocket_emit_status('failed'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user