Skip to content

Commit

Permalink
fix: await gather_endpoints coroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
Girish Chandrashekar committed Jan 12, 2023
1 parent fcb122b commit 367a115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jina/serve/runtimes/gateway/request_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from typing import TYPE_CHECKING, Callable, List, Optional, Tuple

import grpc.aio

from docarray import DocumentArray

from jina.excepts import InternalNetworkError
from jina.helper import GATEWAY_NAME
from jina.logging.logger import JinaLogger
Expand Down Expand Up @@ -147,7 +147,7 @@ async def _process_results_at_end_gateway(
and not self._gathering_endpoints
):
self._gathering_endpoints = True
asyncio.create_task(gather_endpoints(request_graph))
await asyncio.create_task(gather_endpoints(request_graph))

partial_responses = await asyncio.gather(*tasks)
except Exception:
Expand Down

0 comments on commit 367a115

Please sign in to comment.