Skip to content

Commit 00791dd

Browse files
committed
same fix
1 parent 03b3d4b commit 00791dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import arrow
1010
import redis.exceptions
11+
from common_library.async_tools import cancel_wait_task
1112
from redis.asyncio.lock import Lock
1213

1314
from ..background_task import periodic
@@ -116,9 +117,9 @@ async def _wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
116117
module_name=coro.__module__, func_name=coro.__name__
117118
),
118119
)
119-
120120
res = await work_task
121-
auto_extend_lock_task.cancel()
121+
# cancel the auto-extend task (work is done)
122+
await cancel_wait_task(auto_extend_lock_task, max_delay=None)
122123
return res
123124

124125
except BaseExceptionGroup as eg:

0 commit comments

Comments
 (0)