Skip to content

Commit c610325

Browse files
authored
Merge pull request RasaHQ#5309 from RasaHQ/additional-events-fix-2
Do not save tracker during session update
2 parents adcae25 + a292501 commit c610325

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

changelog/5068.bugfix.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Tracker stores supporting conversation sessions (``SQLTrackerStore`` and
2+
``MongoTrackerStore``) do not save the tracker state to database immediately after
3+
starting a new conversation session. This leads to the number of events being saved
4+
in addition to the already-existing ones to be calculated correctly.
5+
6+
This fixes ``action_listen`` events being saved twice at the beginning of
7+
conversation sessions.

rasa/core/processor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ async def _update_tracker_session(
175175
nlg=self.nlg,
176176
)
177177

178-
self.tracker_store.save(tracker)
179-
180178
async def get_tracker_with_session_start(
181179
self, sender_id: Text, output_channel: Optional[OutputChannel] = None,
182180
) -> Optional[DialogueStateTracker]:

0 commit comments

Comments
 (0)