Skip to content

Commit

Permalink
Added outbound healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanWalker277 committed Feb 17, 2024
1 parent 030056f commit febf440
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/health/health.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ export class HealthService extends HealthIndicator{
() => this.checkDatabaseHealth(),
() => this.checkFormServiceHealth(),
() => this.checkTransportSocketHealth(),
() => this.checkOutboundHealth(),
]);
}

async checkUciCoreHealth(): Promise<HealthIndicatorResult> {
return this.http.pingCheck('UCI_CORE', `${this.configService.get('UCI_CORE_BASE_URL')}/service/ping`, {timeout: 3000});
}

async checkOutboundHealth(): Promise<HealthIndicatorResult> {
return this.http.pingCheck('Outbound', `${this.configService.get('OUTBOUND_BASE_URL')}/health`, {timeout: 3000});
}

async checkDatabaseHealth(): Promise<HealthIndicatorResult> {
try {
await this.primsmaService.$queryRaw`SELECT 1`;
Expand Down

0 comments on commit febf440

Please sign in to comment.