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() @Get()
public async getHealth(@Res() response: Response) { public async getHealth(@Res() response: Response) {
const databaseServiceHealthy = await this.healthService.isDatabaseHealthy(); const [databaseServiceHealthy, redisCacheServiceHealthy] =
const redisCacheServiceHealthy = await Promise.all([
await this.healthService.isRedisCacheHealthy(); this.healthService.isDatabaseHealthy(),
this.healthService.isRedisCacheHealthy()
]);
if (databaseServiceHealthy && redisCacheServiceHealthy) { if (databaseServiceHealthy && redisCacheServiceHealthy) {
return response return response

Loading…
Cancel
Save