diff --git a/addons/activeblue_ai/models/ab_ai_bot.py b/addons/activeblue_ai/models/ab_ai_bot.py index f8e50a7..93d6740 100644 --- a/addons/activeblue_ai/models/ab_ai_bot.py +++ b/addons/activeblue_ai/models/ab_ai_bot.py @@ -175,12 +175,11 @@ class AbAiBot(models.Model): Presence = self.env['bus.presence'] now = fields.Datetime.now() # bus.presence.status is a computed field — write only last_poll/last_presence. - # When online: set last_poll 10min ahead so the bot stays "online" across - # the full cron cycle (Odoo cron scheduler fires every ~5min in practice). - # When offline: set last_poll an hour in the past to force "offline" state. + # When online: set both 24h ahead so the bot stays "online" regardless of + # cron timing. The cron explicitly marks offline by setting them to the past. if online: - poll_time = now + timedelta(minutes=10) - presence_time = now + poll_time = now + timedelta(hours=24) + presence_time = now + timedelta(hours=24) else: poll_time = now - timedelta(hours=1) presence_time = now - timedelta(hours=1)