conservative method to validating that a job can be launched from a node

This commit is contained in:
AlanCoding
2017-01-18 12:11:31 -05:00
parent cf07e08c54
commit a8e46021f8
3 changed files with 11 additions and 6 deletions

View File

@@ -121,7 +121,10 @@ class TaskManager():
job = spawn_node.unified_job_template.create_unified_job(**kv)
spawn_node.job = job
spawn_node.save()
can_start = job.signal_start(**kv)
if job._resources_sufficient_for_launch():
can_start = job.signal_start(**kv)
else:
can_start = False
if not can_start:
job.status = 'failed'
job.job_explanation = _("Job spawned from workflow could not start because it "