mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 07:47:44 -02:30
conservative method to validating that a job can be launched from a node
This commit is contained in:
@@ -606,11 +606,10 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin):
|
||||
evars.update(extra_vars)
|
||||
self.update_fields(extra_vars=json.dumps(evars))
|
||||
|
||||
def signal_start(self, **kwargs):
|
||||
# Block cases that would cause the task manager to error
|
||||
if self.inventory_id is None or self.project_id is None:
|
||||
return False
|
||||
return super(Job, self).signal_start(**kwargs)
|
||||
def _resources_sufficient_for_launch(self):
|
||||
if self.job_type == PERM_INVENTORY_SCAN:
|
||||
return self.inventory_id is not None
|
||||
return not (self.inventory_id is None or self.project_id is None)
|
||||
|
||||
def display_artifacts(self):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user