diff --git a/dkredis/dkredis.py b/dkredis/dkredis.py index a269eb6..85f14fe 100644 --- a/dkredis/dkredis.py +++ b/dkredis/dkredis.py @@ -470,7 +470,8 @@ def rate_limiting_lock(resources, seconds=30, cn=None): @contextmanager -def mutex(name, seconds: int=30, timeout: int=60, unlock: bool=True, waitsecs: int=3): +def mutex(name, seconds: int = 30, timeout: int = 60, + unlock: bool = True, waitsecs: int = 3): """Lock the ``name`` for ``seconds``, waiting ``waitsecs`` seconds between each attempt at locking the name. Locking means creating a key 'dkredis:mutex:' + key. diff --git a/dkredis/rediscache.py b/dkredis/rediscache.py index a39e725..b6adc79 100644 --- a/dkredis/rediscache.py +++ b/dkredis/rediscache.py @@ -100,7 +100,8 @@ def put(cls, key, value, duration=None): # writeln("....cache:put:setex(%r, %r, %r) for %r" % ( # k, _duration, v, key # )) - log.debug("....cache:put:setex(%r, %r, %r) for %r", k, _duration, v, key) + log.debug("....cache:put:setex(%r, %r, %r) for %r", + k, _duration, v, key) r.set(k, v, ex=_duration) @classmethod