mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot: add an index on local state
A slow query was detected on the runbot, causing a latency when loading any page. After some investigations (thnks jle), we found that an index on local_state could improve speed.
This commit is contained in:
parent
c13128a229
commit
7adfa6c7eb
@ -51,7 +51,7 @@ class runbot_build(models.Model):
|
|||||||
# state machine
|
# state machine
|
||||||
|
|
||||||
global_state = fields.Selection(make_selection(state_order), string='Status', compute='_compute_global_state', store=True)
|
global_state = fields.Selection(make_selection(state_order), string='Status', compute='_compute_global_state', store=True)
|
||||||
local_state = fields.Selection(make_selection(state_order), string='Build Status', default='pending', required=True, oldname='state')
|
local_state = fields.Selection(make_selection(state_order), string='Build Status', default='pending', required=True, oldname='state', index=True)
|
||||||
global_result = fields.Selection(make_selection(result_order), string='Result', compute='_compute_global_result', store=True)
|
global_result = fields.Selection(make_selection(result_order), string='Result', compute='_compute_global_result', store=True)
|
||||||
local_result = fields.Selection(make_selection(result_order), string='Build Result', oldname='result')
|
local_result = fields.Selection(make_selection(result_order), string='Build Result', oldname='result')
|
||||||
triggered_result = fields.Selection(make_selection(result_order), string='Triggered Result') # triggered by db only
|
triggered_result = fields.Selection(make_selection(result_order), string='Triggered Result') # triggered by db only
|
||||||
|
Loading…
Reference in New Issue
Block a user