Skip to content

Commit

Permalink
add context in docstring and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vcidst committed Mar 4, 2024
1 parent b283918 commit 76c64fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions rasa/core/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ async def _fetch_events_within_time_range(self) -> AsyncIterator[Dict[Text, Any]
events = self._get_events_for_conversation_id(_events, conversation_id)

# the order of events was changed after ATO-2192
# more context: https://github.com/RasaHQ/rasa/pull/13019
# we should sort the events by timestamp to keep the order
events.sort(key=lambda x: x["timestamp"])

Expand Down
3 changes: 3 additions & 0 deletions rasa/core/tracker_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,9 @@ def _event_query(
self, session: "Session", sender_id: Text, fetch_events_from_all_sessions: bool
) -> "Query":
"""Provide the query to retrieve the conversation events for a specific sender.
The events are ordered by ID to ensure correct sequence of events.
As `timestamp` is not guaranteed to be unique and low-precision (float), it
cannot be used to order the events.
Args:
session: Current database session.
Expand Down

0 comments on commit 76c64fe

Please sign in to comment.