Skip to content

Commit

Permalink
[Refactor] reset RayServegRPCContext metadata initialize list construct
Browse files Browse the repository at this point in the history
Signed-off-by: Cheng-Yeh Chung <[email protected]>
  • Loading branch information
kenchung285 committed Jan 17, 2025
1 parent cfa3d34 commit 0635492
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/ray/serve/grpc_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ def __init__(self, grpc_context: grpc._cython.cygrpc._ServicerContext):
self._auth_context = grpc_context.auth_context()
self._code = grpc_context.code()
self._details = grpc_context.details()
self._invocation_metadata = list(grpc_context.invocation_metadata())
self._invocation_metadata = [ # noqa: C416
(key, value) for key, value in grpc_context.invocation_metadata()
]
self._peer = grpc_context.peer()
self._peer_identities = grpc_context.peer_identities()
self._peer_identity_key = grpc_context.peer_identity_key()
self._trailing_metadata = list(grpc_context.trailing_metadata())
self._trailing_metadata = [ # noqa: C416
(key, value) for key, value in grpc_context.trailing_metadata()
]
self._compression = None

def auth_context(self) -> Dict[str, Any]:
Expand Down

0 comments on commit 0635492

Please sign in to comment.