Skip to content

Commit

Permalink
fmt, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits committed Feb 7, 2025
1 parent a79c9ec commit 76da508
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,19 @@ async def _receive_message(self, client_id: ClientConnectionId, message: agent_w
case None:
logger.warning("Received empty message")

async def _receive_control_message(self, client_id: ClientConnectionId, message: agent_worker_pb2.ControlMessage) -> None:
async def _receive_control_message(
self, client_id: ClientConnectionId, message: agent_worker_pb2.ControlMessage
) -> None:
logger.info(f"Received message from client {client_id}: {message}")
destination = message.destination
if destination.startswith("agentid="):
agent_id = AgentId.from_str(destination[len("agentid="):])
agent_id = AgentId.from_str(destination[len("agentid=") :])
target_client_id = self._agent_type_to_client_id.get(agent_id.type)
if target_client_id is None:
logger.error(f"Agent client id not found for agent type {agent_id.type}.")
return
elif destination.startswith("clientid="):
target_client_id = destination[len("clientid="):]
target_client_id = destination[len("clientid=") :]

Check warning on line 217 in python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime_host_servicer.py

View check run for this annotation

Codecov / codecov/patch

python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime_host_servicer.py#L208-L217

Added lines #L208 - L217 were not covered by tests
else:
logger.error(f"Invalid destination {destination}")
return

Check warning on line 220 in python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime_host_servicer.py

View check run for this annotation

Codecov / codecov/patch

python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime_host_servicer.py#L219-L220

Added lines #L219 - L220 were not covered by tests
Expand Down

0 comments on commit 76da508

Please sign in to comment.