Skip to content

Commit

Permalink
lintscore
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherbjorn committed Dec 7, 2023
1 parent d146cfc commit 90ec2e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dkredis/dkredis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion dkredis/rediscache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 90ec2e7

Please sign in to comment.