File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
nestjs-libraries/src/bull-mq-transport-new Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -26,19 +26,9 @@ export const concurrency = async <T>(
2626 load = await mapper [ strippedIdentifier ] . schedule < T > (
2727 { expiration : 600000 } ,
2828 async ( ) => {
29- return await Promise . race < T > ( [
30- new Promise < T > ( async ( res ) => {
31- await timer ( 300000 ) ;
32- res ( true as T ) ;
33- } ) ,
34- new Promise < T > ( async ( res ) => {
35- try {
36- return res ( await func ( ) ) ;
37- } catch ( err ) {
38- res ( err as T ) ;
39- }
40- } ) ,
41- ] ) ;
29+ try {
30+ return await func ( ) ;
31+ } catch ( err ) { }
4232 }
4333 ) ;
4434 } catch ( err ) { }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class BullMqServer extends Server implements CustomTransportStrategy {
3434 } ,
3535 {
3636 maxStalledCount : 10 ,
37- concurrency : 10 ,
37+ concurrency : 5 ,
3838 connection : ioRedis ,
3939 removeOnComplete : {
4040 count : 0 ,
You can’t perform that action at this time.
0 commit comments