style(): run prettier

This commit is contained in:
Kamil Myśliwiec
2021-08-16 09:30:29 +02:00
parent 524dc72159
commit 9d0551ff25
86 changed files with 506 additions and 449 deletions

View File

@@ -59,14 +59,15 @@ class ClientOptionService implements ClientsModuleOptionsFactory {
name: 'USE_CLASS_CLIENT',
useClass: ClientOptionService,
inject: [ConfigService],
}, {
},
{
imports: [ConfigModule],
inject: [ConfigService],
name: 'CUSTOM_PROXY_CLIENT',
useFactory: (config: ConfigService) => ({
customClass: ErrorHandlingProxy
})
}
customClass: ErrorHandlingProxy,
}),
},
]),
],
controllers: [AppController],

View File

@@ -14,23 +14,21 @@ export class DisconnectedClientController {
@Post()
call(@Body() options): Observable<number> {
const client = ClientProxyFactory.create(options);
return client
.send<number, number[]>({ cmd: 'none' }, [1, 2, 3])
.pipe(
/*tap(
return client.send<number, number[]>({ cmd: 'none' }, [1, 2, 3]).pipe(
/*tap(
console.log.bind(console, 'data'),
console.error.bind(console, 'error'),
),*/
catchError(error => {
const { code } = error || { code: 'CONN_ERR' };
return throwError(() =>
code === 'ECONNREFUSED' ||
code === 'CONN_ERR' ||
code === 'CONNECTION_REFUSED'
? new RequestTimeoutException('ECONNREFUSED')
: new InternalServerErrorException(),
);
}),
);
catchError(error => {
const { code } = error || { code: 'CONN_ERR' };
return throwError(() =>
code === 'ECONNREFUSED' ||
code === 'CONN_ERR' ||
code === 'CONNECTION_REFUSED'
? new RequestTimeoutException('ECONNREFUSED')
: new InternalServerErrorException(),
);
}),
);
}
}

View File

@@ -23,7 +23,8 @@ const explicitPartitioner = () => {
@Controller()
export class KafkaConcurrentController
implements OnModuleInit, OnModuleDestroy {
implements OnModuleInit, OnModuleDestroy
{
protected readonly logger = new Logger(KafkaConcurrentController.name);
@Client({