From dc56a0ee2b12d247a0c07863a6d35f74988c9c17 Mon Sep 17 00:00:00 2001 From: Pavel Gnedov Date: Wed, 10 Aug 2022 19:00:49 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B2=20pipe-=D0=B0=D1=85=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.module.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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(