Deployment prod
This commit is contained in:
@@ -56,16 +56,10 @@ async def lifespan(app: FastAPI):
|
||||
|
||||
watcher = asyncio.create_task(watch_and_reset())
|
||||
|
||||
app.state.youtrack_mcp = await YouTrackMCPClient(
|
||||
str(os.getenv('YOUTRACK_MCP_SERVER')),
|
||||
str(os.getenv('YOUTRACK_MCP_TOKEN')),
|
||||
).connect()
|
||||
|
||||
yield
|
||||
|
||||
# ---- shutdown ----
|
||||
watcher.cancel()
|
||||
await app.state.youtrack_mcp.close()
|
||||
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user