Skip to content

Commit 367d722

Browse files
committed
fix(health-indicator): update RedisHealthIndicator to use HealthIndicatorService directly
1 parent f2db41c commit 367d722

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/health-indicator/src/lib/health.indicator.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ import { Redis } from './interfaces';
77

88
@Injectable()
99
export class RedisHealthIndicator {
10-
constructor(
11-
private readonly healthIndicatorService: HealthIndicatorService,
12-
) {}
10+
/**
11+
* TODO
12+
*
13+
* This is workaround, this should be DI but for some reason
14+
* HealthIndicatorService is not injected after building the package.
15+
*
16+
* Reference (how it should be): https://docs.nestjs.com/recipes/terminus#custom-health-indicator
17+
*
18+
* ToDo: Fix this issue in the future.
19+
*/
20+
private healthIndicatorService = new HealthIndicatorService();
1321

1422
async isHealthy(
1523
key: string,

0 commit comments

Comments
 (0)