mirror of
https://gitlab.com/mobicoop/v3/service/ad.git
synced 2026-01-10 21:02:41 +00:00
update health package
This commit is contained in:
@@ -8,13 +8,10 @@ import {
|
||||
import { EventEmitterModule } from '@nestjs/event-emitter';
|
||||
import { RequestContextModule } from 'nestjs-request-context';
|
||||
import { MessagerModule } from '@modules/messager/messager.module';
|
||||
import { HealthModule } from '@mobicoop/health-module';
|
||||
import { HealthModule, HealthRepositoryPort } from '@mobicoop/health-module';
|
||||
import { AD_REPOSITORY } from '@modules/ad/ad.di-tokens';
|
||||
import { MESSAGE_PUBLISHER } from '@modules/messager/messager.di-tokens';
|
||||
import {
|
||||
HealthModuleOptions,
|
||||
ICheckRepository,
|
||||
} from '@mobicoop/health-module/dist/core/domain/types/health.types';
|
||||
import { HealthModuleOptions } from '@mobicoop/health-module/dist/core/domain/types/health.types';
|
||||
import { MessagePublisherPort } from '@mobicoop/ddd-library';
|
||||
|
||||
@Module({
|
||||
@@ -47,12 +44,17 @@ import { MessagePublisherPort } from '@mobicoop/ddd-library';
|
||||
imports: [AdModule, MessagerModule],
|
||||
inject: [AD_REPOSITORY, MESSAGE_PUBLISHER],
|
||||
useFactory: async (
|
||||
adRepository: ICheckRepository,
|
||||
adRepository: HealthRepositoryPort,
|
||||
messagePublisher: MessagePublisherPort,
|
||||
): Promise<HealthModuleOptions> => ({
|
||||
serviceName: 'ad',
|
||||
criticalLoggingKey: 'logging.ad.health.crit',
|
||||
checkRepositories: [adRepository],
|
||||
checkRepositories: [
|
||||
{
|
||||
name: 'AdRepository',
|
||||
repository: adRepository,
|
||||
},
|
||||
],
|
||||
messagePublisher,
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -2,7 +2,6 @@ syntax = "proto3";
|
||||
|
||||
package health;
|
||||
|
||||
|
||||
service Health {
|
||||
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
|
||||
}
|
||||
@@ -18,4 +17,5 @@ message HealthCheckResponse {
|
||||
NOT_SERVING = 2;
|
||||
}
|
||||
ServingStatus status = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user