Prettify output

This commit is contained in:
Eden Kirin
2023-03-23 00:21:20 +01:00
parent 544b7d6c85
commit 8d1e31ac5f

View File

@ -28,12 +28,9 @@ TIMEZONE = "Europe/Zagreb"
@asynccontextmanager
async def get_serve_segments_stub() -> AsyncGenerator[ServeSegmentsStub, None]:
"""Connect to segments server and create stub"""
async with grpc.aio.insecure_channel(
f"{SERVE_SEGMENTS_HOST}:{SERVE_SEGMENTS_PORT}"
) as channel:
print(
f"🖥 Connected to ServeSegments server on {SERVE_SEGMENTS_HOST}:{SERVE_SEGMENTS_PORT}"
)
serve_segments_addr = f"{SERVE_SEGMENTS_HOST}:{SERVE_SEGMENTS_PORT}"
async with grpc.aio.insecure_channel(serve_segments_addr) as channel:
print(f"🖥 Connected to ServeSegments server on {serve_segments_addr}")
yield ServeSegmentsStub(channel)