diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-04-02 16:13:55 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-04-02 16:13:55 +0000 |
commit | fee49c995e1ba1f182fa8121ca833d06419b25e1 (patch) | |
tree | 885bb595b9fb815c84a24a0d69dcdcc7d0a4e366 | |
parent | 9fc17f6f4abdb04f3cf1b60b87bd67b894a19c39 (diff) | |
parent | 66f91aac7070b01bd9038ddeee96a5f9ec35d858 (diff) | |
download | gitlab-ce-fee49c995e1ba1f182fa8121ca833d06419b25e1.tar.gz |
Merge branch 'fix-nplus-query-pipelines' into 'master'
Fix N+1 query in loading pipelines in merge requests
See merge request !10363
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index f12be98c80c..ad7e0b23ff4 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -210,7 +210,7 @@ module Ci end def stuck? - builds.pending.any?(&:stuck?) + builds.pending.includes(:project).any?(&:stuck?) end def retryable? |