Sort the pending builds by timestamp

So that builds that have been pending for a longer time are fetched first.
This commit is contained in:
Christopher Baines 2020-10-21 20:49:58 +01:00
parent 5124f3be3e
commit 63fc1917f8

View file

@ -493,7 +493,8 @@ WHERE builds.build_server_id = $1 AND
latest_build_status.status IN (
'scheduled', 'started'
)
ORDER BY latest_build_status.status DESC -- 'started' first
ORDER BY latest_build_status.status DESC, -- 'started' first
latest_build_status.timestamp ASC
LIMIT 10000")
(map