Skip to content

Commit

Permalink
filter config
Browse files Browse the repository at this point in the history
  • Loading branch information
luweizheng committed Aug 13, 2024
1 parent b27fccf commit f5d3e7c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/xoscar/backends/communication/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ def channel_type(self) -> int:

@classmethod
def parse_config(cls, config: dict) -> dict:
if config is None or not config:
return dict()
# we only need the following config
keys_of_interest = ["listen_elastic_ip", "address", "host", "port"]
parsed_config = {key: config[key] for key in keys_of_interest if key in config}
keys = ["listen_elastic_ip"]
parsed_config = {key: config[key] for key in keys if key in config}

return parsed_config

Expand Down

0 comments on commit f5d3e7c

Please sign in to comment.