From 0ffca70782ff694402e65f9ebcaa897b0bc8a2e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Wed, 29 Jan 2025 08:07:54 +0000 Subject: [PATCH] fix(api): use ping instead of keys for healtcheck --- apps/api/src/controllers/healthcheck.controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/healthcheck.controller.ts b/apps/api/src/controllers/healthcheck.controller.ts index a9a18957..26dd4b72 100644 --- a/apps/api/src/controllers/healthcheck.controller.ts +++ b/apps/api/src/controllers/healthcheck.controller.ts @@ -21,7 +21,7 @@ export async function healthcheck( request: FastifyRequest, reply: FastifyReply, ) { - const redisRes = await withTimings(getRedisCache().keys('op:buffer:*')); + const redisRes = await withTimings(getRedisCache().ping()); const dbRes = await withTimings(db.project.findFirst()); const queueRes = await withTimings(eventsQueue.getCompleted()); const chRes = await withTimings( @@ -34,7 +34,7 @@ export async function healthcheck( reply.status(status).send({ redis: redisRes ? { - ok: !!redisRes.data.length, + ok: redisRes.data === 'PONG', time: `${redisRes.time}ms`, } : null,