Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions redis/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def do_release(self, expected_token: str) -> None:
lock_name=self.name,
)

def extend(self, additional_time: int, replace_ttl: bool = False) -> bool:
def extend(self, additional_time: Number, replace_ttl: bool = False) -> bool:
"""
Adds more time to an already acquired lock.

Expand All @@ -281,7 +281,7 @@ def extend(self, additional_time: int, replace_ttl: bool = False) -> bool:
raise LockError("Cannot extend a lock with no timeout", lock_name=self.name)
return self.do_extend(additional_time, replace_ttl)

def do_extend(self, additional_time: int, replace_ttl: bool) -> bool:
def do_extend(self, additional_time: Number, replace_ttl: bool) -> bool:
additional_time = int(additional_time * 1000)
if not bool(
self.lua_extend(
Expand Down
Loading