File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed
Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11{
2- "name" : " @nestjstools /messaging-redis-extension" ,
3- "version" : " 1.2.2 " ,
2+ "name" : " @kastov /messaging-redis-extension" ,
3+ "version" : " 1.3.0 " ,
44 "description" : " Extension to handle messages and dispatch them over Redis" ,
55 "author" : " Sebastian Iwanczyszyn" ,
66 "private" : false ,
106106 "coverageDirectory" : " ../coverage" ,
107107 "testEnvironment" : " node"
108108 }
109- }
109+ }
Original file line number Diff line number Diff line change @@ -38,8 +38,14 @@ export class RedisChannelConfig extends ChannelConfig {
3838}
3939
4040interface Connection {
41- host : string ;
42- port : number ;
41+ connectionOpts :
42+ | {
43+ host : string ;
44+ port : number ;
45+ }
46+ | {
47+ path : string ;
48+ } ;
4349 password ?: string ;
4450 db ?: number ;
4551}
Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ import { RedisChannelConfig } from './redis.channel-config';
55
66@Injectable ( )
77@ChannelFactory ( RedisChannelConfig )
8- export class RedisChannelFactory
9- implements IChannelFactory < RedisChannelConfig >
10- {
8+ export class RedisChannelFactory implements IChannelFactory < RedisChannelConfig > {
119 create ( channelConfig : RedisChannelConfig ) : RedisChannel {
1210 return new RedisChannel ( channelConfig ) ;
1311 }
Original file line number Diff line number Diff line change @@ -9,7 +9,11 @@ export class RedisChannel extends Channel<RedisChannelConfig> {
99 constructor ( config : RedisChannelConfig ) {
1010 super ( config ) ;
1111 this . queue = new Queue ( config . queue , {
12- connection : this . config . connection ,
12+ connection : {
13+ ...this . config . connection . connectionOpts ,
14+ password : this . config . connection . password ,
15+ db : this . config . connection . db ,
16+ } ,
1317 prefix : config . keyPrefix ,
1418 defaultJobOptions : {
1519 removeOnComplete : config . bullJobOptions ?. removeOnComplete ,
You can’t perform that action at this time.
0 commit comments