mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-08-16 14:00:20 +02:00
Move dockerfiles inside gateway/ and update main CLI script to be able to run build, up, down and logs on a local gateway server instance.
This commit is contained in:
@@ -25,7 +25,7 @@ services:
|
||||
container_name: invariant-gateway-test
|
||||
build:
|
||||
context: ${GATEWAY_ROOT_PATH}
|
||||
dockerfile: ${GATEWAY_ROOT_PATH}/Dockerfile.gateway
|
||||
dockerfile: ${GATEWAY_ROOT_PATH}/gateway/Dockerfile.gateway
|
||||
depends_on:
|
||||
app-api:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import os
|
||||
import time
|
||||
|
||||
from datetime import timedelta
|
||||
from contextlib import AsyncExitStack
|
||||
from typing import Any, Optional
|
||||
|
||||
@@ -68,7 +68,9 @@ class MCPClient:
|
||||
)
|
||||
self.stdio, self.write = stdio_transport
|
||||
self.session = await self.exit_stack.enter_async_context(
|
||||
ClientSession(self.stdio, self.write)
|
||||
ClientSession(
|
||||
self.stdio, self.write, read_timeout_seconds=timedelta(minutes=0.5)
|
||||
)
|
||||
)
|
||||
|
||||
await self.session.initialize()
|
||||
@@ -130,5 +132,6 @@ async def run(
|
||||
finally:
|
||||
# Sleep for a while to allow the server to process the background tasks
|
||||
# like pushing traces to the explorer
|
||||
time.sleep(2)
|
||||
if push_to_explorer:
|
||||
time.sleep(2)
|
||||
await client.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user