mirror of
https://github.com/ansible/awx.git
synced 2026-08-03 19:40:00 -02:30
Refactor job event collection to build and manage an internal cache of
potential parent values to reduce the number of queries to the database
This commit is contained in:
@@ -675,7 +675,8 @@ class JobEvent(CreatedModifiedModel):
|
||||
update_fields.append('host_id')
|
||||
except (IndexError, AttributeError):
|
||||
pass
|
||||
self.parent = self._find_parent()
|
||||
if self.parent is None:
|
||||
self.parent = self._find_parent()
|
||||
if 'parent' not in update_fields:
|
||||
update_fields.append('parent')
|
||||
super(JobEvent, self).save(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user