fix(v03): route prestop drain through v1 dispatcher (#2004)
This commit is contained in:
+1
-1
@@ -564,7 +564,7 @@ lanes:
|
|||||||
replicas: 2
|
replicas: 2
|
||||||
shutdownDrain:
|
shutdownDrain:
|
||||||
enabled: true
|
enabled: true
|
||||||
path: /internal/workbench/drain
|
path: /v1/internal/workbench/drain
|
||||||
sleepSeconds: 3
|
sleepSeconds: 3
|
||||||
timeoutMs: 2500
|
timeoutMs: 2500
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -661,7 +661,7 @@ async function handleRestAdapter(request, response, url, options) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url.pathname === "/internal/workbench/drain") {
|
if (url.pathname === "/v1/internal/workbench/drain") {
|
||||||
if (request.method !== "POST") {
|
if (request.method !== "POST") {
|
||||||
sendJson(response, 405, { ok: false, error: { code: "method_not_allowed", message: "POST required." } });
|
sendJson(response, 405, { ok: false, error: { code: "method_not_allowed", message: "POST required." } });
|
||||||
return;
|
return;
|
||||||
@@ -676,7 +676,7 @@ async function handleRestAdapter(request, response, url, options) {
|
|||||||
timeoutMs: parsePositiveInteger((options.env ?? process.env).HWLAB_WORKBENCH_SSE_DRAIN_TIMEOUT_MS, 2500),
|
timeoutMs: parsePositiveInteger((options.env ?? process.env).HWLAB_WORKBENCH_SSE_DRAIN_TIMEOUT_MS, 2500),
|
||||||
env: options.env ?? process.env
|
env: options.env ?? process.env
|
||||||
});
|
});
|
||||||
sendJson(response, 200, { ok: true, route: "/internal/workbench/drain", result });
|
sendJson(response, 200, { ok: true, route: "/v1/internal/workbench/drain", result });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user