Exemplo n.º 1
0
    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
Exemplo n.º 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))