mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Avoid dependency manager for jobs with no deps
This commit is contained in:
parent
85beb9eb70
commit
54b21e5872
@ -600,6 +600,19 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
|
||||
def get_ui_url(self):
|
||||
return urljoin(settings.TOWER_URL_BASE, "/#/jobs/playbook/{}".format(self.pk))
|
||||
|
||||
def _set_default_dependencies_processed(self):
|
||||
"""
|
||||
This sets the initial value of dependencies_processed
|
||||
and here we use this as a shortcut to avoid the DependencyManager for jobs that do not need it
|
||||
"""
|
||||
if (not self.project) or self.project.scm_update_on_launch:
|
||||
self.dependencies_processed = False
|
||||
elif (not self.inventory) or self.inventory.inventory_sources.filter(update_on_launch=True).exists():
|
||||
self.dependencies_processed = False
|
||||
else:
|
||||
# No dependencies to process
|
||||
self.dependencies_processed = True
|
||||
|
||||
@property
|
||||
def event_class(self):
|
||||
if self.has_unpartitioned_events:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user