Browse Source

Setup liveness probe endpoint

pull/8037/head
Thomas Kaul 2 weeks ago
parent
commit
a972ac2e74
  1. 8
      apps/api/src/app/health/health.controller.ts

8
apps/api/src/app/health/health.controller.ts

@ -34,9 +34,11 @@ export class HealthController {
@Get()
public async getHealth(@Res() response: Response) {
const databaseServiceHealthy = await this.healthService.isDatabaseHealthy();
const redisCacheServiceHealthy =
await this.healthService.isRedisCacheHealthy();
const [databaseServiceHealthy, redisCacheServiceHealthy] =
await Promise.all([
this.healthService.isDatabaseHealthy(),
this.healthService.isRedisCacheHealthy()
]);
if (databaseServiceHealthy && redisCacheServiceHealthy) {
return response

Loading…
Cancel
Save