Skip to content

Commit fb77727

Browse files
committed
docs (main.py)
1 parent dca3f83 commit fb77727

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/backend/base/langflow/api/v1/mcp_projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,8 +1202,8 @@ def __init__(self, project_id: UUID):
12021202
# TODO: implement an environment variable to enable/disable stateless mode
12031203
self.session_manager = StreamableHTTPSessionManager(self.server, stateless=True)
12041204
# since we lazily initialize the session manager's
1205-
# lifecyle (run()), we use the lock to prevent
1206-
# race conditions on concurrent requests.
1205+
# lifecyle (via .run(), which can only be called once),
1206+
# we use the lock to prevent race conditions on concurrent requests.
12071207
self._manager_lock = asyncio.Lock()
12081208
self._manager_started = False
12091209

src/backend/base/langflow/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,10 @@ async def delayed_init_mcp_servers():
310310
# Create AsyncExitStack for context managers that need
311311
# to be kept alive for the duration of lf main's lifespan.
312312
# Right now, this includes the streamable-http
313-
# session manager's lifecycle for the v1/mcp server,
314-
# and the project MCP global exit stack that manages
315-
# each project's streamable-http session manager.
313+
# session mgr's lifecycle ctx mgr for the v1/mcp server,
314+
# and the MCP project servers' global lifecycle mgr
315+
# that maintains each per-project streamable-http
316+
# session mgr's lifecycle mgr.
316317
from contextlib import AsyncExitStack
317318

318319
from langflow.api.v1.mcp import init_streamable_http_manager

0 commit comments

Comments
 (0)