mirror of
https://github.com/odoo/runbot.git
synced 2025-03-16 07:55:45 +07:00
[FIX] runbot: limit number of log lines shown on build page
When displaying build logs, all the messages from ir_logging about this particular build are fetched from the database. From time to times, it happens that the number of logged messages is really huge. Those messages lines could also contain multiple lines, multiplying the number of row to generate in the html page. When this happens, the process that generates the template last a long time and ends with a MemoryError. If the end user, bored, hits the refresh button multiple times, all the workers will be busy building this template. In the end, all users get a Bad Gateway from nginx. With this commit, the number of messages that will be taken into account will be limited to 10000.
This commit is contained in:
parent
602298330a
commit
ffd27739a4
@ -190,7 +190,7 @@ class Runbot(Controller):
|
||||
domain.append(('level', '=', level.upper()))
|
||||
if search:
|
||||
domain.append(('message', 'ilike', search))
|
||||
logging_ids = Logging.sudo().search(domain)
|
||||
logging_ids = Logging.sudo().search(domain, limit=10000)
|
||||
|
||||
context = {
|
||||
'repo': build.repo_id,
|
||||
|
Loading…
Reference in New Issue
Block a user