[FIX] runbot: limit the number of builds in other builds button

Actually, the "Other builds" button can increase the page size and
increase the page loading time.
With this commit, the number of other builds visible in the button is limited to 100.
This commit is contained in:
Christophe Monniez 2018-05-29 10:56:21 +02:00
parent 223ba61828
commit 5feec55e87

View File

@ -164,7 +164,7 @@ class Runbot(http.Controller):
real_build = build.duplicate_id if build.state == 'duplicate' else build
# other builds
build_ids = Build.search([('branch_id', '=', build.branch_id.id)])
build_ids = Build.search([('branch_id', '=', build.branch_id.id)], limit=100)
other_builds = Build.browse(build_ids)
domain = [('build_id', '=', real_build.id)]
log_type = request.params.get('type', '')