Order builds by id instead of created_at in RegisterJobService

This commit is contained in:
Dylan Griffith 2018-05-03 14:54:08 +02:00
parent af15b6f0e1
commit 0ae3005781
1 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ module Ci
end
def builds_for_project_runner
new_builds.where(project: runner.projects.without_deleted.with_builds_enabled).order('created_at ASC')
new_builds.where(project: runner.projects.without_deleted.with_builds_enabled).order('id ASC')
end
def builds_for_group_runner
@ -94,7 +94,7 @@ module Ci
.with_group_runners_enabled
.with_builds_enabled
.without_deleted
new_builds.where(project: projects).order('created_at ASC')
new_builds.where(project: projects).order('id ASC')
end
def running_builds_for_shared_runners