async def unset_lock(self, resource, lock_identifier):
        """
        Tries to unset the lock to all the redis instances

        :param resource: The resource string name to lock
        :param lock_identifier: The id of the lock. A unique string
        :return float: The elapsed time that took to lock the instances in iseconds
        :raises: LockError if the lock has not matching identifier in more then
            (N/2 - 1) instances
        """
        start_time = time.time()

        successes = await asyncio.gather(*[
            i.unset_lock(resource, lock_identifier) for
            i in self.instances
        ], return_exceptions=True)
        successful_remvoes = sum(s is None for s in successes)

        elapsed_time = time.time() - start_time
        unlocked = True if successful_remvoes >= int(len(self.instances) / 2) + 1 else False

        self.log.debug('Lock "%s" is unset on %d/%d instances in %s seconds',
                       resource, successful_remvoes, len(self.instances), elapsed_time)

        if not unlocked:
            raise LockError('Can not release the lock')

        return elapsed_time
async def unset_lock ( self , resource , lock_identifier ) : start_time = time . time ( ) successes = await asyncio . gather ( * [ i . unset_lock ( resource , lock_identifier ) for i in self . instances ] , return_exceptions = True ) successful_remvoes = sum ( s is None for s in successes ) elapsed_time = time . time ( ) - start_time unlocked = True if successful_remvoes >= int ( len ( self . instances ) / 2 ) + 1 else False self . log . debug ( 'Lock "%s" is unset on %d/%d instances in %s seconds' , resource , successful_remvoes , len ( self . instances ) , elapsed_time ) if not unlocked : raise LockError ( 'Can not release the lock' ) return elapsed_time
Tries to unset the lock to all the redis instances

        :param resource: The resource string name to lock
        :param lock_identifier: The id of the lock. A unique string
        :return float: The elapsed time that took to lock the instances in iseconds
        :raises: LockError if the lock has not matching identifier in more then
            (N/2 - 1) instances