How to use the aioredlock.Lock function in aioredlock

To help you get started, we’ve selected a few aioredlock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joanvila / aioredlock / tests / ut / test_algorithm.py View on Github external
def locked_lock():
    return Lock(None, "resource_name", 1, True)
github joanvila / aioredlock / tests / ut / test_lock.py View on Github external
def test_lock(self):
        lock_manager = Aioredlock()
        lock = Lock(lock_manager, "potato", 1, 1.0)
        assert lock.resource == "potato"
        assert lock.id == 1
        assert lock.valid is False

aioredlock

Asyncio implemetation of Redis distributed locks

MIT
Latest version published 2 years ago

Package Health Score

60 / 100
Full package analysis

Similar packages