mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Merge pull request #5710 from ryanpetrello/job-event-api-perf
drastically speed up /api/v2/jobs/N/job_events/ with large counts Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
1ce197041f
@ -3858,8 +3858,7 @@ class JobJobEventsList(BaseJobEventsList):
|
||||
def get_queryset(self):
|
||||
job = self.get_parent_object()
|
||||
self.check_parent_access(job)
|
||||
qs = job.job_events
|
||||
qs = qs.select_related('host')
|
||||
qs = job.job_events.select_related('host').order_by('start_line')
|
||||
return qs.all()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user