Reduce health check timeout and remove logging for health check status
This commit is contained in:
parent
ebe84fc757
commit
081cbb3410
@ -62,20 +62,14 @@ export class HealthService {
|
||||
try {
|
||||
const response = await firstValueFrom(
|
||||
this.httpService.get(url, {
|
||||
timeout: 6000,
|
||||
timeout: 500,
|
||||
}),
|
||||
);
|
||||
|
||||
status =
|
||||
response.status === 200 ? ServiceStatusEnum.UP : ServiceStatusEnum.DOWN;
|
||||
|
||||
this.logger.log(`Health check for ${serviceName}: ${status}`);
|
||||
} catch (error) {
|
||||
status = ServiceStatusEnum.DOWN;
|
||||
|
||||
this.logger.warn(
|
||||
`Health check failed for ${serviceName}: ${error.message}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (serviceName === 'default') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user