File tree 2 files changed +37
-5
lines changed
2 files changed +37
-5
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,38 @@ const EnvironmentSchema = z.object({
151
151
CACHE_REDIS_TLS_DISABLED : z . string ( ) . default ( process . env . REDIS_TLS_DISABLED ?? "false" ) ,
152
152
CACHE_REDIS_CLUSTER_MODE_ENABLED : z . string ( ) . default ( "0" ) ,
153
153
154
+ REALTIME_STREAMS_REDIS_HOST : z
155
+ . string ( )
156
+ . optional ( )
157
+ . transform ( ( v ) => v ?? process . env . REDIS_HOST ) ,
158
+ REALTIME_STREAMS_REDIS_READER_HOST : z
159
+ . string ( )
160
+ . optional ( )
161
+ . transform ( ( v ) => v ?? process . env . REDIS_READER_HOST ) ,
162
+ REALTIME_STREAMS_REDIS_READER_PORT : z . coerce
163
+ . number ( )
164
+ . optional ( )
165
+ . transform (
166
+ ( v ) =>
167
+ v ?? ( process . env . REDIS_READER_PORT ? parseInt ( process . env . REDIS_READER_PORT ) : undefined )
168
+ ) ,
169
+ REALTIME_STREAMS_REDIS_PORT : z . coerce
170
+ . number ( )
171
+ . optional ( )
172
+ . transform ( ( v ) => v ?? ( process . env . REDIS_PORT ? parseInt ( process . env . REDIS_PORT ) : undefined ) ) ,
173
+ REALTIME_STREAMS_REDIS_USERNAME : z
174
+ . string ( )
175
+ . optional ( )
176
+ . transform ( ( v ) => v ?? process . env . REDIS_USERNAME ) ,
177
+ REALTIME_STREAMS_REDIS_PASSWORD : z
178
+ . string ( )
179
+ . optional ( )
180
+ . transform ( ( v ) => v ?? process . env . REDIS_PASSWORD ) ,
181
+ REALTIME_STREAMS_REDIS_TLS_DISABLED : z
182
+ . string ( )
183
+ . default ( process . env . REDIS_TLS_DISABLED ?? "false" ) ,
184
+ REALTIME_STREAMS_REDIS_CLUSTER_MODE_ENABLED : z . string ( ) . default ( "0" ) ,
185
+
154
186
PUBSUB_REDIS_HOST : z
155
187
. string ( )
156
188
. optional ( )
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import { RedisRealtimeStreams } from "./redisRealtimeStreams.server";
5
5
function initializeRedisRealtimeStreams ( ) {
6
6
return new RedisRealtimeStreams ( {
7
7
redis : {
8
- port : env . REDIS_PORT ,
9
- host : env . REDIS_HOST ,
10
- username : env . REDIS_USERNAME ,
11
- password : env . REDIS_PASSWORD ,
8
+ port : env . REALTIME_STREAMS_REDIS_PORT ,
9
+ host : env . REALTIME_STREAMS_REDIS_HOST ,
10
+ username : env . REALTIME_STREAMS_REDIS_USERNAME ,
11
+ password : env . REALTIME_STREAMS_REDIS_PASSWORD ,
12
12
enableAutoPipelining : true ,
13
- ...( env . REDIS_TLS_DISABLED === "true" ? { } : { tls : { } } ) ,
13
+ ...( env . REALTIME_STREAMS_REDIS_TLS_DISABLED === "true" ? { } : { tls : { } } ) ,
14
14
keyPrefix : "tr:realtime:streams:" ,
15
15
} ,
16
16
} ) ;
You can’t perform that action at this time.
0 commit comments