File tree 3 files changed +32
-8
lines changed
components/nodes/vectorstores/Redis 3 files changed +32
-8
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,12 @@ class Redis_VectorStores implements INode {
153
153
keepAlive :
154
154
process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
155
155
? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
156
- : undefined // milliseconds
157
- }
156
+ : undefined
157
+ } ,
158
+ pingInterval :
159
+ process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
160
+ ? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
161
+ : undefined // Add Redis protocol-level pings
158
162
} )
159
163
await redisClient . connect ( )
160
164
@@ -226,8 +230,12 @@ class Redis_VectorStores implements INode {
226
230
keepAlive :
227
231
process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
228
232
? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
229
- : undefined // milliseconds
230
- }
233
+ : undefined
234
+ } ,
235
+ pingInterval :
236
+ process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
237
+ ? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
238
+ : undefined // Add Redis protocol-level pings
231
239
} )
232
240
233
241
const storeConfig : RedisVectorStoreConfig = {
Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ export class RedisEventPublisher implements IServerSideEventStreamer {
13
13
process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
14
14
? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
15
15
: undefined
16
- }
16
+ } ,
17
+ pingInterval :
18
+ process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
19
+ ? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
20
+ : undefined
17
21
} )
18
22
} else {
19
23
this . redisPublisher = createClient ( {
@@ -30,7 +34,11 @@ export class RedisEventPublisher implements IServerSideEventStreamer {
30
34
process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
31
35
? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
32
36
: undefined
33
- }
37
+ } ,
38
+ pingInterval :
39
+ process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
40
+ ? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
41
+ : undefined
34
42
} )
35
43
}
36
44
}
Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ export class RedisEventSubscriber {
15
15
process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
16
16
? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
17
17
: undefined
18
- }
18
+ } ,
19
+ pingInterval :
20
+ process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
21
+ ? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
22
+ : undefined
19
23
} )
20
24
} else {
21
25
this . redisSubscriber = createClient ( {
@@ -32,7 +36,11 @@ export class RedisEventSubscriber {
32
36
process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
33
37
? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
34
38
: undefined
35
- }
39
+ } ,
40
+ pingInterval :
41
+ process . env . REDIS_KEEP_ALIVE && ! isNaN ( parseInt ( process . env . REDIS_KEEP_ALIVE , 10 ) )
42
+ ? parseInt ( process . env . REDIS_KEEP_ALIVE , 10 )
43
+ : undefined
36
44
} )
37
45
}
38
46
this . sseStreamer = sseStreamer
You can’t perform that action at this time.
0 commit comments