diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-01 13:57:13 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-01 13:57:24 +0100 |
commit | b66fe22a09d3969cd44c7eadab67eee8370fb998 (patch) | |
tree | db1dbc985405f9666daffbdab5a6539cc653d0cc /app/workers | |
parent | 44ef6806cab0b4bca3d94f9254fd1c34f350ed72 (diff) | |
download | gitlab-ce-b66fe22a09d3969cd44c7eadab67eee8370fb998.tar.gz |
Make 'joins' line shorter
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/stuck_ci_builds_worker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/stuck_ci_builds_worker.rb b/app/workers/stuck_ci_builds_worker.rb index c89c5832afd..0c51c34a47f 100644 --- a/app/workers/stuck_ci_builds_worker.rb +++ b/app/workers/stuck_ci_builds_worker.rb @@ -45,7 +45,7 @@ class StuckCiBuildsWorker def search(status, timeout) builds = Ci::Build.where(status: status).where('ci_builds.updated_at < ?', timeout.ago) - builds.joins(:project).includes(project: :namespace).includes(:tags).includes(:runner).find_each(batch_size: 50).each do |build| + builds.joins(:project).includes(:tags, :runner, project: :namespace).find_each(batch_size: 50).each do |build| yield(build) end end |