Skip to content

Commit

Permalink
pr example
Browse files Browse the repository at this point in the history
Signed-off-by: Future Outlier <[email protected]>
  • Loading branch information
Future Outlier committed Dec 4, 2023
1 parent 94e6998 commit a670fd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flytekit/clis/sdk_in_container/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ def serve(_: click.Context, port, worker, timeout):

async def _start_grpc_server(port: int, worker: int, timeout: int):
click.secho("Starting up the server to expose the prometheus metrics...", fg="blue")
print("port:", port)
from flytekit.extend.backend.agent_service import AsyncAgentService, AgentMetadataService

try:
from prometheus_client import start_http_server

start_http_server(9090)
start_http_server(10000 + port)
except ImportError as e:
click.secho(f"Failed to start the prometheus server with error {e}", fg="red")
click.secho("Starting the agent service...", fg="blue")
Expand Down
1 change: 1 addition & 0 deletions flytekit/extend/backend/agent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ async def GetAgent(self, request: GetAgentRequest, context: grpc.ServicerContext
)

async def ListAgent(self, request: ListAgentsRequest, context: grpc.ServicerContext) -> ListAgentsResponse:
print("@@@ ListAgent is called!")
agents = []

Check warning on line 151 in flytekit/extend/backend/agent_service.py

View check run for this annotation

Codecov / codecov/patch

flytekit/extend/backend/agent_service.py#L149-L151

Added lines #L149 - L151 were not covered by tests
for name in AgentRegistry._REGISTRY.keys():
agents.append(

Check warning on line 153 in flytekit/extend/backend/agent_service.py

View check run for this annotation

Codecov / codecov/patch

flytekit/extend/backend/agent_service.py#L153

Added line #L153 was not covered by tests
Expand Down

0 comments on commit a670fd2

Please sign in to comment.