Skip to content

Commit

Permalink
add timestamp ordering to events
Browse files Browse the repository at this point in the history
  • Loading branch information
vcidst committed Mar 4, 2024
1 parent 90c25b4 commit 49d5208
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rasa/core/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ async def _fetch_events_within_time_range(self) -> AsyncIterator[Dict[Text, Any]
continue

events = self._get_events_for_conversation_id(_events, conversation_id)

# the order of events was changed after ATO-2192
# we should sort the events by timestamp to keep the order
events.sort(key=lambda x: x["timestamp"])

# the conversation IDs are needed in the event publishing
for event in events:
if (
Expand Down

0 comments on commit 49d5208

Please sign in to comment.