Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ducminh-phan committed Nov 30, 2020
1 parent 4366223 commit 799641d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rasa/core/tracker_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,24 @@ def save(self, tracker, timeout=None):
)

def retrieve(self, sender_id: Text) -> Optional[DialogueStateTracker]:
"""Retrieves tracker for the latest conversation session.
The Redis key is formed by appending a prefix to sender_id.
Args:
sender_id: Conversation ID to fetch the tracker for.
Returns:
Tracker containing events from the latest conversation sessions.
"""
stored = self.red.get(self.key_prefix + sender_id)
if stored is not None:
return self.deserialise_tracker(sender_id, stored)
else:
return None

def keys(self) -> Iterable[Text]:
"""Returns keys of the Redis Tracker Store"""
"""Returns keys of the Redis Tracker Store."""
return self.red.keys(self.key_prefix + "*")


Expand Down

0 comments on commit 799641d

Please sign in to comment.