Skip to content

Commit 152d1f7

Browse files
committed
fix
1 parent c1e4b4e commit 152d1f7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ async def _wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
119119
)
120120
res = await work_task
121121
# cancel the auto-extend task (work is done)
122+
# NOTE: if we do not explicitely await the task inside the context manager
123+
# it sometimes hangs forever (Python issue?)
122124
await cancel_wait_task(auto_extend_lock_task, max_delay=None)
123125
return res
124126

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ async def _periodic_renewer() -> None:
135135
result = await work_task
136136

137137
# Cancel renewal task (work is done)
138+
# NOTE: if we do not explicitely await the task inside the context manager
139+
# it sometimes hangs forever (Python issue?)
138140
await cancel_wait_task(renewal_task, max_delay=None)
139141

140142
return result

0 commit comments

Comments
 (0)