anurag008w commited on
Commit
be82891
·
1 Parent(s): 271e44a

Change Jupyter API status endpoint to '/login'

Browse files
Files changed (1) hide show
  1. health-server.js +2 -2
health-server.js CHANGED
@@ -302,7 +302,7 @@ const server = http.createServer(async (req, res) => {
302
  if (pathname === "/status") {
303
  const [gatewayReady, jupyterReady] = await Promise.all([
304
  probePort(GATEWAY_HOST, GATEWAY_PORT, "/health"),
305
- JUPYTER_ENABLED ? probePort(JUPYTER_HOST, JUPYTER_PORT, `${JUPYTER_BASE}/api/status`) : Promise.resolve(false),
306
  ]);
307
  res.writeHead(200, { "Content-Type": "application/json" });
308
  return res.end(JSON.stringify({ model: LLM_MODEL, uptime: formatUptime(Date.now() - startTime), gatewayReady, jupyterReady, sync: getSyncStatus(), whatsapp: readGuardianStatus(), keepalive: getKeepaliveStatus() }));
@@ -316,7 +316,7 @@ const server = http.createServer(async (req, res) => {
316
  if (pathname === "/" || pathname === "/dashboard") {
317
  const [gatewayReady, jupyterReady] = await Promise.all([
318
  probePort(GATEWAY_HOST, GATEWAY_PORT, "/health"),
319
- JUPYTER_ENABLED ? probePort(JUPYTER_HOST, JUPYTER_PORT, `${JUPYTER_BASE}/api/status`) : Promise.resolve(false),
320
  ]);
321
  res.writeHead(200, { "Content-Type": "text/html" });
322
  return res.end(renderDashboard({ uptimeHuman: formatUptime(Date.now() - startTime), gatewayReady, jupyterReady, sync: getSyncStatus(), whatsapp: readGuardianStatus(), keepalive: getKeepaliveStatus() }));
 
302
  if (pathname === "/status") {
303
  const [gatewayReady, jupyterReady] = await Promise.all([
304
  probePort(GATEWAY_HOST, GATEWAY_PORT, "/health"),
305
+ JUPYTER_ENABLED ? probePort(JUPYTER_HOST, JUPYTER_PORT, `${JUPYTER_BASE}/login`) : Promise.resolve(false),
306
  ]);
307
  res.writeHead(200, { "Content-Type": "application/json" });
308
  return res.end(JSON.stringify({ model: LLM_MODEL, uptime: formatUptime(Date.now() - startTime), gatewayReady, jupyterReady, sync: getSyncStatus(), whatsapp: readGuardianStatus(), keepalive: getKeepaliveStatus() }));
 
316
  if (pathname === "/" || pathname === "/dashboard") {
317
  const [gatewayReady, jupyterReady] = await Promise.all([
318
  probePort(GATEWAY_HOST, GATEWAY_PORT, "/health"),
319
+ JUPYTER_ENABLED ? probePort(JUPYTER_HOST, JUPYTER_PORT, `${JUPYTER_BASE}/login`) : Promise.resolve(false),
320
  ]);
321
  res.writeHead(200, { "Content-Type": "text/html" });
322
  return res.end(renderDashboard({ uptimeHuman: formatUptime(Date.now() - startTime), gatewayReady, jupyterReady, sync: getSyncStatus(), whatsapp: readGuardianStatus(), keepalive: getKeepaliveStatus() }));