fix: align scan terminal proxy and build timeouts
This commit is contained in:
@@ -4,10 +4,10 @@ import { buildForceRefreshProxyCachePolicy } from "@/lib/proxy-cache-policy";
|
||||
|
||||
const API_BASE = process.env.POLYWEATHER_API_BASE_URL;
|
||||
const SCAN_TERMINAL_PROXY_TIMEOUT_MS = Number(
|
||||
process.env.POLYWEATHER_SCAN_TERMINAL_PROXY_TIMEOUT_MS || "28000",
|
||||
process.env.POLYWEATHER_SCAN_TERMINAL_PROXY_TIMEOUT_MS || "40000",
|
||||
);
|
||||
|
||||
export const maxDuration = 30;
|
||||
export const maxDuration = 45;
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
if (!API_BASE) {
|
||||
|
||||
@@ -45,5 +45,5 @@ def test_scan_terminal_backend_timeout_returns_before_next_proxy_abort():
|
||||
ROOT / "frontend" / "app" / "api" / "scan" / "terminal" / "route.ts"
|
||||
).read_text(encoding="utf-8")
|
||||
|
||||
assert 'POLYWEATHER_SCAN_TERMINAL_PROXY_TIMEOUT_MS || "28000"' in route_source
|
||||
assert scan_terminal_config.SCAN_TERMINAL_BUILD_TIMEOUT_SEC <= 20
|
||||
assert 'POLYWEATHER_SCAN_TERMINAL_PROXY_TIMEOUT_MS || "40000"' in route_source
|
||||
assert scan_terminal_config.SCAN_TERMINAL_BUILD_TIMEOUT_SEC <= 30
|
||||
|
||||
@@ -31,9 +31,9 @@ SCAN_TERMINAL_PAYLOAD_TTL_SEC = min(
|
||||
)
|
||||
SCAN_TERMINAL_BUILD_TIMEOUT_SEC = _env_int(
|
||||
"POLYWEATHER_SCAN_TERMINAL_BUILD_TIMEOUT_SEC",
|
||||
20,
|
||||
30,
|
||||
min_value=8,
|
||||
max_value=20,
|
||||
max_value=30,
|
||||
)
|
||||
SCAN_TERMINAL_MAX_WORKERS = _env_int(
|
||||
"POLYWEATHER_SCAN_TERMINAL_MAX_WORKERS",
|
||||
|
||||
Reference in New Issue
Block a user