forked from Shared/esg
database migrated to POSTGRESQL
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
HealthCheck,
|
||||
HealthCheckService,
|
||||
MemoryHealthIndicator,
|
||||
MongooseHealthIndicator,
|
||||
TypeOrmHealthIndicator,
|
||||
} from '@nestjs/terminus';
|
||||
import { HealthService } from './health.service';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { HealthService } from './health.service';
|
||||
export class HealthController {
|
||||
constructor(
|
||||
private readonly health: HealthCheckService,
|
||||
private readonly mongoose: MongooseHealthIndicator,
|
||||
private readonly database: TypeOrmHealthIndicator,
|
||||
private readonly memory: MemoryHealthIndicator,
|
||||
private readonly disk: DiskHealthIndicator,
|
||||
private readonly healthService: HealthService,
|
||||
@@ -28,7 +28,7 @@ export class HealthController {
|
||||
@HealthCheck({ swaggerDocumentation: false })
|
||||
readiness() {
|
||||
return this.health.check([
|
||||
() => this.mongoose.pingCheck('mongodb', { timeout: 1000 }),
|
||||
() => this.database.pingCheck('postgres', { timeout: 1000 }),
|
||||
() => this.memory.checkHeap('memory_heap', this.healthService.heapThresholdBytes()),
|
||||
() =>
|
||||
this.disk.checkStorage('disk', {
|
||||
|
||||
Reference in New Issue
Block a user