48 lines
2.4 KiB
XML
48 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Upgrading from 18.0.2.0.0: the per-minute queue cron and the 5-minute scan cron are
|
|
merged into cron_odoosh_tick below. Matched by code rather than by XML id, so a fresh
|
|
install stays quiet (a missing XML id logs a warning and a traceback), and restricted
|
|
to this model so no other module's cron can be caught by the generic code strings. -->
|
|
<delete model="ir.cron"
|
|
search="[('model_id.model', '=', 'odoosh.sync.log'),
|
|
('code', 'in', ['model.cron_process()', 'model.cron_scan()']),
|
|
('active', 'in', [True, False])]"/>
|
|
|
|
<data noupdate="1">
|
|
|
|
<!-- The only frequent cron. Every minute it drains the queue: one indexed query on a
|
|
table that is normally empty, so an idle tick costs nothing worth measuring.
|
|
Every `odoosh.scan_interval_minutes` minutes (30 by default, 0 disables it) the
|
|
same tick walks the users first.
|
|
|
|
Why one cron instead of two: the work is tiny either way, but Odoo's cron pool is
|
|
shared by the whole database (max_cron_threads, 2 by default), and it is the slot
|
|
held every minute - not the CPU - that competes with other modules. -->
|
|
<record id="cron_odoosh_tick" model="ir.cron">
|
|
<field name="name">OdooshCN: sync queue and user scan</field>
|
|
<field name="model_id" ref="model_odoosh_sync_log"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model.cron_tick()</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">minutes</field>
|
|
<field name="active" eval="True"/>
|
|
</record>
|
|
|
|
<!-- Daily: send the full list of users so the platform can deactivate the ones that
|
|
disappeared. An empty local list is skipped; the platform guards the ratio too. -->
|
|
<record id="cron_odoosh_reconcile" model="ir.cron">
|
|
<field name="name">OdooshCN: daily reconciliation</field>
|
|
<field name="model_id" ref="model_odoosh_sync_log"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model.cron_reconcile()</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="active" eval="True"/>
|
|
</record>
|
|
|
|
</data>
|
|
|
|
</odoo>
|