mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-26 18:01:47 -05:00
Optimize task manager with debug toolbar, adjust prefetch (#12588)
This commit is contained in:
committed by
Seth Foster
parent
e6f8852b05
commit
f7e6a32444
@@ -338,10 +338,8 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin, RelatedJobsMixin):
|
||||
active_inventory_sources = self.inventory_sources.filter(source__in=CLOUD_INVENTORY_SOURCES)
|
||||
failed_inventory_sources = active_inventory_sources.filter(last_job_failed=True)
|
||||
total_hosts = active_hosts.count()
|
||||
if total_hosts != self.total_hosts:
|
||||
update_task_impact = True
|
||||
else:
|
||||
update_task_impact = False
|
||||
# if total_hosts has changed, set update_task_impact to True
|
||||
update_task_impact = total_hosts != self.total_hosts
|
||||
computed_fields = {
|
||||
'has_active_failures': bool(failed_hosts.count()),
|
||||
'total_hosts': total_hosts,
|
||||
|
||||
@@ -706,10 +706,7 @@ class UnifiedJob(
|
||||
editable=False,
|
||||
help_text=_("A cached list with pk values from preferred instance groups."),
|
||||
)
|
||||
task_impact = models.PositiveIntegerField(
|
||||
default=0,
|
||||
editable=False,
|
||||
)
|
||||
task_impact = models.PositiveIntegerField(default=0, editable=False, help_text=_("Number of forks an instance consumes when running this job."))
|
||||
organization = models.ForeignKey(
|
||||
'Organization',
|
||||
blank=True,
|
||||
|
||||
Reference in New Issue
Block a user