Skip to content

Commit e0f45da

Browse files
committed
linting
1 parent 81f8d71 commit e0f45da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/service-library/src/servicelib/redis/_semaphore.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,18 @@ async def release(self) -> None:
216216
result = status
217217

218218
if result == "released":
219+
assert success == 1 # nosec
219220
_logger.debug(
220-
"Released semaphore '%s' (instance: %s)",
221+
"Released semaphore '%s' (instance: %s, count: %s, expired: %s)",
221222
self.key,
222223
self.instance_id,
224+
current_count,
225+
expired_count,
223226
)
224227
else:
225228
# Instance wasn't in the semaphore set - this shouldn't happen
226229
# but let's handle it gracefully
230+
assert success == 0 # nosec
227231
raise SemaphoreNotAcquiredError(name=self.key)
228232

229233
async def _try_acquire(self) -> bool:

0 commit comments

Comments
 (0)