|
|
@ -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 |
|
|
|