feat(addon): show AI bot online in Discuss when agent is healthy
Extend cron_ping_all to upsert a bus.presence row for the activeblue_ai_bot user, mirroring the agent service's reachability: green dot when /health responds 200, offline otherwise. Drop the cron interval from 5m to 1m so the presence stays fresh (Odoo's presence client expects refreshes well under a minute).
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<field name="model_id" ref="model_ab_ai_bot"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.cron_ping_all()</field>
|
||||
<field name="interval_number">5</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">minutes</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user