Skip to content

Commit

Permalink
Added blocking parameter to lock
Browse files Browse the repository at this point in the history
  • Loading branch information
WisdomPill committed Apr 18, 2022
1 parent 4e7f2d4 commit 5c851f1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions django_redis/client/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ def lock(
self,
key,
version: Optional[int] = None,
timeout=None,
sleep=0.1,
blocking_timeout=None,
timeout: Optional[float] = None,
sleep: float = 0.1,
blocking: bool = True,
blocking_timeout: Optional[float] = None,
client: Optional[Redis] = None,
thread_local=True,
):
Expand All @@ -352,6 +353,7 @@ def lock(
key,
timeout=timeout,
sleep=sleep,
blocking=blocking,
blocking_timeout=blocking_timeout,
thread_local=thread_local,
)
Expand Down

0 comments on commit 5c851f1

Please sign in to comment.