Files
odoo_source/addons/website/data/ir_cron_data.xml
T
Romain Derie 8386d62702 [FIX] website: change the asset disabling from GC to CRON
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>
2021-11-18 08:37:49 +00:00

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>