Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Increase Quart timeout via env var
Tomas Valenta70f0e356d0a3
diff --git a/api-service/app.py b/api-service/app.pyindex 10e79e0ec..6316af31b 100644--- a/api-service/app.py+++ b/api-service/app.py@@ -5,7 +5,7 @@ from pprint import pprintfrom dotenv import load_dotenvfrom typing import Listfrom playground_client.exceptions import NotFoundException-from quart import Quart, make_response, request+from quart import Quart, config, requestfrom quart_cors import corsfrom codegen import Codegen@@ -24,6 +24,7 @@ if not url or not key:db = Database(url, key)app = Quart(__name__)+app.config.from_prefixed_env()app = cors(app, allow_origin="*")@@ -47,10 +48,6 @@ async def health():async def generate():body = await request.json- response = await make_response()- response.timeout = None # type: ignore- # response.timeout = 1 # type: ignore-run_id = str(uuid.uuid4())project_id = body["projectID"]route_id = body["routeID"]diff --git a/package.json b/package.jsonindex 987d57ca4..2f1ae5b96 100644--- a/package.json+++ b/package.json@@ -8,7 +8,7 @@"dev": "npx concurrently -p none \"next dev\" \"npm run start:api\" \"npm run start:playground\"","dev:api-service": "npx concurrently \"npm run start:api\" \"npm run start:playground\"","build": "next build",- "start:api": "cd api-service && QUART_APP=app:app PYTHONUNBUFFERED=1 poetry run quart --debug run --reload --port 49155",+ "start:api": "cd api-service && QUART_APP=app:app PYTHONUNBUFFERED=1 QUART_RESPONSE_TIMEOUT=86400 poetry run quart --debug run --reload --port 49155","start:playground": "cd api-service/playground && npm run dev","install:api-service": "cd api-service && poetry install && cd playground && npm i","install:all": "npm i && npm run install:api-service",