Merge branch 'master' into staging

server-lite startup
This commit is contained in:
Nour Alharithi
2023-12-15 18:26:27 -08:00

View File

@@ -153,6 +153,17 @@ const main = async () => {
handleHealthCheck(2 * SLOT_STALENESS_TOLERANCE * 400, slotSubscriber) handleHealthCheck(2 * SLOT_STALENESS_TOLERANCE * 400, slotSubscriber)
); );
const handleStartup = async (_req, res, _next) => {
if (redisClient.connected) {
res.writeHead(200);
res.end('OK');
} else {
res.writeHead(500);
res.end('Not ready');
}
};
app.get('/startup', handleStartup);
app.get('/l2', async (req, res, next) => { app.get('/l2', async (req, res, next) => {
try { try {
const { const {