changes
This commit is contained in:
34
fusion_plating/fusion_plating_jobs/data/fp_cron_data.xml
Normal file
34
fusion_plating/fusion_plating_jobs/data/fp_cron_data.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
|
||||
Daily cron — nudge supervisor for steps stuck in `paused` state
|
||||
longer than 24 hours. Schedules a mail.activity on the parent job
|
||||
so the manager sees a TODO. Idempotent — re-running the same day
|
||||
won't double-schedule.
|
||||
-->
|
||||
<odoo noupdate="1">
|
||||
<record id="ir_cron_nudge_stale_paused_steps" model="ir.cron">
|
||||
<field name="name">Fusion Plating: Nudge stale paused steps</field>
|
||||
<field name="model_id" ref="fusion_plating.model_fp_job_step"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model._cron_nudge_stale_paused(threshold_hours=24)</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="active" eval="True"/>
|
||||
</record>
|
||||
|
||||
<!-- Twin cron for in_progress steps. Lower threshold (8h) because
|
||||
an in_progress step has an open timelog row accumulating
|
||||
phantom hours every minute it sits idle. -->
|
||||
<record id="ir_cron_nudge_stale_in_progress_steps" model="ir.cron">
|
||||
<field name="name">Fusion Plating: Nudge stale in-progress steps</field>
|
||||
<field name="model_id" ref="fusion_plating.model_fp_job_step"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model._cron_nudge_stale_in_progress(threshold_hours=8)</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="active" eval="True"/>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user