예제 #1
0
파일: lock_store.py 프로젝트: zoovu/rasa
    def get_lock(self, conversation_id: Text) -> Optional[TicketLock]:
        """Retrieves lock (see parent docstring for more information)."""
        serialised_lock = self.red.get(self.key_prefix + conversation_id)
        if serialised_lock:
            return TicketLock.from_dict(json.loads(serialised_lock))

        return None
예제 #2
0
 def get_lock(self, conversation_id: Text) -> Optional[TicketLock]:
     serialised_lock = self.red.get(conversation_id)
     if serialised_lock:
         return TicketLock.from_dict(json.loads(serialised_lock))