(self, resource)
return successful_sets >= int(len(self.instances) / 2) + 1
Checks if the resource is locked by any redlock instance.

        :param resource: The resource string name to lock
        :returns: True if locked else False
Checks if the resource is locked by any redlock instance.
Checks if the resource is locked by any redlock instance .
async def is_locked(self, resource):
        """
        Checks if the resource is locked by any redlock instance.

        :param resource: The resource string name to lock
        :returns: True if locked else False
        """

        successes = await asyncio.gather(*[
            i.is_locked(resource) for
            i in self.instances
        ], return_exceptions=True)
        successful_sets = sum(s is True for s in successes)

        return successful_sets >= int(len(self.instances) / 2) + 1
async def is_locked ( self , resource ) : successes = await asyncio . gather ( * [ i . is_locked ( resource ) for i in self . instances ] , return_exceptions = True ) successful_sets = sum ( s is True for s in successes ) return successful_sets >= int ( len ( self . instances ) / 2 ) + 1