refactor private property in health module
This commit is contained in:
parent
d9fc46513d
commit
9728ed69ab
|
@ -14,7 +14,7 @@ import { MessagePublisherPort } from '@libs/ports/message-publisher.port';
|
|||
|
||||
@Injectable()
|
||||
export class RepositoriesHealthIndicatorUseCase extends HealthIndicator {
|
||||
private checkRepositories: CheckRepositoryPort[];
|
||||
private _checkRepositories: CheckRepositoryPort[];
|
||||
constructor(
|
||||
@Inject(AD_REPOSITORY)
|
||||
private readonly adRepository: AdRepositoryPort,
|
||||
|
@ -22,12 +22,12 @@ export class RepositoriesHealthIndicatorUseCase extends HealthIndicator {
|
|||
private readonly messagePublisher: MessagePublisherPort,
|
||||
) {
|
||||
super();
|
||||
this.checkRepositories = [adRepository];
|
||||
this._checkRepositories = [adRepository];
|
||||
}
|
||||
isHealthy = async (key: string): Promise<HealthIndicatorResult> => {
|
||||
try {
|
||||
await Promise.all(
|
||||
this.checkRepositories.map(
|
||||
this._checkRepositories.map(
|
||||
async (checkRepository: CheckRepositoryPort) => {
|
||||
await checkRepository.healthCheck();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue