Only query recent pending builds
To avoid old pending builds that never leave the scheduled/started state.
This commit is contained in:
parent
5674f8838d
commit
adc1d01525
1 changed files with 2 additions and 1 deletions
|
|
@ -501,7 +501,8 @@ LEFT JOIN latest_build_status
|
|||
WHERE builds.build_server_id = $1 AND
|
||||
latest_build_status.status IN (
|
||||
'scheduled', 'started'
|
||||
)
|
||||
) AND
|
||||
latest_build_status.timestamp > (current_date - interval '28' day)
|
||||
ORDER BY latest_build_status.status DESC, -- 'started' first
|
||||
latest_build_status.timestamp ASC
|
||||
LIMIT 10000")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue