Исправлены ошибки в pipe-ах приложения

This commit is contained in:
Pavel Gnedov 2022-08-10 19:00:49 +07:00
parent 7d26ecc618
commit dc56a0ee2b

View file

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