increase claude timeout from 10 to 60 minutes

This commit is contained in:
Fam Zheng 2026-04-07 10:51:40 +01:00
parent 3fb234b2cd
commit ff2fe9a244

View File

@ -17,7 +17,7 @@ gitea = GiteaClient()
ALLOWED_OWNER = "euphon"
MAX_RESPONSE_LEN = 60000
CLAUDE_TIMEOUT = 600 # 10 minutes
CLAUDE_TIMEOUT = 3600 # 60 minutes
app = FastAPI()
@ -127,7 +127,7 @@ async def run_claude(prompt: str, cwd: str) -> str:
except asyncio.TimeoutError:
proc.kill()
await proc.wait()
return "*Claude timed out after 10 minutes.*"
return f"*Claude timed out after {CLAUDE_TIMEOUT // 60} minutes.*"
if proc.returncode != 0:
err = stderr.decode().strip()