Make 'joins' line shorter

This commit is contained in:
Tomasz Maczukin 2017-03-01 13:57:13 +01:00
parent 44ef6806ca
commit b66fe22a09
No known key found for this signature in database
GPG Key ID: 7E9EB2E4B0F625CD
1 changed files with 1 additions and 1 deletions

View File

@ -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