Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚗️ Changed periodic_task_result internals in the attempt of solving issue #7032

Merged
merged 4 commits into from
Jan 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,16 @@ async def _status_update() -> TaskStatus:
)
return task_status

async def _wait_task_completion() -> None:
async def _wait_for_task_result() -> Any:
task_status = await _status_update()
while not task_status.done:
await asyncio.sleep(status_poll_interval)
task_status = await _status_update()

try:
await asyncio.wait_for(_wait_task_completion(), timeout=task_timeout)

result = await client.get_task_result(task_id)
return await client.get_task_result(task_id)

try:
result = await asyncio.wait_for(_wait_for_task_result(), timeout=task_timeout)
logger.debug("%s, %s", f"{task_id=}", f"{result=}")

yield result
Expand Down
Loading