Before this commit, the behavior disabling the unused snippet assets was put directly in the autovacuum CRON instead of its own CRON. That behavior is leading to some perf-issue running the autovacuum cron since it would take too much time. Indeed, the code will loop inside as many snippet as it exists, and every time then perform an SQL Query to get the HTML fields using the snippet. An improvement will come later to not loop on every snippet anymore. task-2694120 closes odoo/odoo#79981 X-original-commit: 96ab95d37c9b442a4ccb737fd867ca91ec1c11b6 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
13 lines
518 B
XML
13 lines
518 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="website_disable_unused_snippets_assets" model="ir.cron">
|
|
<field name="name">Disable unused snippets assets</field>
|
|
<field name="model_id" ref="model_website"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model._disable_unused_snippets_assets()</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">weeks</field>
|
|
<field name="numbercall">-1</field>
|
|
</record>
|
|
</odoo>
|