Commit b66fe22a authored by Tomasz Maczukin's avatar Tomasz Maczukin

Make 'joins' line shorter

parent 44ef6806
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment