diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-03 04:36:22 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-04 16:47:16 -0700 |
commit | 2bb94ff7f915bdc09275085a075e202f92241811 (patch) | |
tree | 7a7b5c8269e02c7097b4bc3a881f41cee53fab82 /lib/api/jobs.rb | |
parent | c26cbfcdfb6a0c83253f42be016692abc3548e8c (diff) | |
download | gitlab-ce-2bb94ff7f915bdc09275085a075e202f92241811.tar.gz |
Eliminate N+1 queries for CI job artifacts in /api/projects/:id/pipelines/:pipeline_id/jobssh-fix-pipeline-jobs-nplus-one
Diffstat (limited to 'lib/api/jobs.rb')
-rw-r--r-- | lib/api/jobs.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb index 54d1acbd412..e95b0dd5267 100644 --- a/lib/api/jobs.rb +++ b/lib/api/jobs.rb @@ -54,6 +54,7 @@ module API pipeline = user_project.pipelines.find(params[:pipeline_id]) builds = pipeline.builds builds = filter_builds(builds, params[:scope]) + builds = builds.preload(:job_artifacts_archive) present paginate(builds), with: Entities::Job end |