Skip to content

Commit 3d83293

Browse files
authored
fix: check readiness before timeout (#600)
1 parent 981b3d3 commit 3d83293

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

taskiq/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ async def wait_result(
9898
"""
9999
start_time = time()
100100
while not await self.is_ready():
101-
await asyncio.sleep(check_interval)
102101
if 0 < timeout < time() - start_time:
103102
raise TaskiqResultTimeoutError(timeout=timeout)
103+
await asyncio.sleep(check_interval)
104104
return await self.get_result(with_logs=with_logs)
105105

106106
async def get_progress(self) -> "TaskProgress[Any] | None":

0 commit comments

Comments
 (0)