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
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))