Skip to content

Commit d4a8c62

Browse files
committed
Address feedback
1 parent f3a11c0 commit d4a8c62

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ A demonstration project showcasing Model Context Protocol (MCP) implementations
1414
- [Inspect with MCP inspector](#inspect-with-mcp-inspector)
1515
- [Run local Agents <-> MCP](#run-local-agents---mcp)
1616
- [Deploy to Azure](#deploy-to-azure)
17-
- [Azure account setup](#azure-account-setup)
18-
- [Deploying with azd](#deploying-with-azd)
19-
- [Costs](#costs)
2017
- [Deploy to Azure with private networking](#deploy-to-azure-with-private-networking)
2118

2219
## Getting started
@@ -253,7 +250,7 @@ You can try the [Azure pricing calculator](https://azure.com/e/3987c81282c84410b
253250

254251
---
255252

256-
### Deploy to Azure with private networking
253+
## Deploy to Azure with private networking
257254

258255
To demonstrate enhanced security for production deployments, this project supports deploying with a virtual network (VNet) configuration that restricts public access to Azure resources.
259256

agents/agentframework_http.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
load_dotenv(override=True)
2121

2222
# Constants
23+
RUNNING_IN_PRODUCTION = os.getenv("RUNNING_IN_PRODUCTION", "false").lower() == "true"
2324
MCP_SERVER_URL = os.getenv("MCP_SERVER_URL", "http://localhost:8000/mcp/")
2425

2526
# Configure chat client based on API_HOST
@@ -69,6 +70,11 @@ async def http_mcp_example() -> None:
6970
result = await agent.run(user_query, tools=mcp_server)
7071
print(result)
7172

73+
# Keep the worker alive in production
74+
while RUNNING_IN_PRODUCTION:
75+
await asyncio.sleep(60)
76+
logger.info("Worker still running...")
77+
7278

7379
if __name__ == "__main__":
7480
asyncio.run(http_mcp_example())

0 commit comments

Comments
 (0)