(self, resource, lock_identifier)
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: LockRuntimeError or LockAcquiringError or LockError if the lock has no
            matching identifier in more then (N/2 - 1) instances
Tries to unset the lock to all the redis instances
Tries to unset the lock to all the redis instances
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: LockRuntimeError or LockAcquiringError or LockError if the lock has no
            matching identifier in more then (N/2 - 1) instances
        """

        if not self.instances:
            return .0

        start_time = time.monotonic()

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

        elapsed_time = time.monotonic() - start_time
        unlocked = successful_removes >= int(len(self.instances) / 2) + 1

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

        if not unlocked:
            raise_error(successes, 'Can not release the lock')

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