I’ve been testing reminders and having mixed results. I saw from the logs that my reminder was cancelled:
2023-01-24 10:00:17 DEBUG rasa.core.processor - Canceled reminder because it is outdated (ReminderScheduled(intent: EXTERNAL_reminder, trigger_date: 2023-01-24 10:00:17.052633, entities: None, name: interval_reminder))
I am using the kill_on_user_message=True
option so reminders are cancelled if the user adds anything in the meantime before the reminder is triggered.
The above reminder did not have any user events following it, so it shouldn’t be cancelled.
I had a look into the code (I’m using rasa 2.8.32) to make sure I’m understanding this correctly -
reminder_event: ReminderScheduled,
sender_id: Text,
output_channel: OutputChannel,
) -> None:
"""Handle a reminder that is triggered asynchronously."""
async with self.lock_store.lock(sender_id):
tracker = await self.fetch_tracker_and_update_session(
sender_id, output_channel
)
if (
reminder_event.kill_on_user_message
and self._has_message_after_reminder(tracker, reminder_event)
or not self._is_reminder_still_valid(tracker, reminder_event)
):
logger.debug(
f"Canceled reminder because it is outdated ({reminder_event})."
)
else:
intent = reminder_event.intent
entities = reminder_event.entities or {}
Checking the tracker state, the only other event that followed the reminder was the action_listen
event, which should be ok? Or shouldn’t it?
The session was not restarted. The only thing I can think of, is that the session has timed out? E.g. due to session_expiration_time
?
From my testing, this does indeed appear to be the case.
I tried setting a reminder for +55mins from now, and another for +65minutes. The +55min reminder worked but the +65min failed as it was outdated.
I’m not 100% certain but everything I’ve gathered points to kill_on_user_message=True
killing off reminders that fall outside the session window (in my case 60 minutes).