From b66fe22a09d3969cd44c7eadab67eee8370fb998 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 1 Mar 2017 13:57:13 +0100 Subject: Make 'joins' line shorter --- app/workers/stuck_ci_builds_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/workers') 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 -- cgit v1.2.1