Skip to content

Commit

Permalink
fix: define metrics in worker before grpc server (#4816)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed May 23, 2022
1 parent 3a7d95b commit 87de3c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jina/serve/runtimes/worker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ async def async_setup(self):
"""
Start the DataRequestHandler and wait for the GRPC and Monitoring servers to start
"""
await self._async_setup_grpc_server()

if self.metrics_registry:
with ImportExtensions(
required=True,
Expand All @@ -55,6 +53,8 @@ async def async_setup(self):
else:
self._summary_time = contextlib.nullcontext()

await self._async_setup_grpc_server()

async def _async_setup_grpc_server(self):
"""
Start the DataRequestHandler and wait for the GRPC server to start
Expand Down

0 comments on commit 87de3c0

Please sign in to comment.