diff --git a/src/app.module.ts b/src/app.module.ts index 9c40454..c7fb676 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -5,7 +5,7 @@ import { TimestampEnhancer } from '@app/event-emitter/issue-enhancers/timestamps import { MainController } from '@app/event-emitter/main/main.controller'; import { Logger, Module, OnModuleInit } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; -import { switchMap } from 'rxjs'; +import { switchMap, tap } from 'rxjs'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import configuration from './configs/app'; @@ -64,8 +64,12 @@ export class AppModule implements OnModuleInit { ]); this.personalNotificationsService.$messages.subscribe((message) => { - // eslint-disable-next-line prettier/prettier - this.logger.log(`Get personal message ${JSON.stringify(message.message)} for recipients ${JSON.stringify(message.recipients)}`); + this.logger.log( + `Get personal message ` + + JSON.stringify(message.message) + + ` for recipients ` + + JSON.stringify(message.recipients), + ); }); this.statusChangeNotificationsService.$changes.subscribe((change) => { this.logger.log( @@ -77,19 +81,12 @@ export class AppModule implements OnModuleInit { ); }); - this.redmineIssuesCacheWriterService.subject.subscribe( - async (saveResult) => { - await this.personalNotificationsService.analize(saveResult); - }, - ); - this.redmineIssuesCacheWriterService.subject .pipe( - switchMap(async (saveResult) => { + tap((saveResult) => { this.logger.debug( `Save result process started, issue_id = ${saveResult.current.id}`, ); - return saveResult; }), ) .pipe(