Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3242434
D3850.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
844 B
Referenced Files
None
Subscribers
None
D3850.diff
View Options
diff --git a/keyserver/src/socket/redis.js b/keyserver/src/socket/redis.js
--- a/keyserver/src/socket/redis.js
+++ b/keyserver/src/socket/redis.js
@@ -21,11 +21,20 @@
}
}
+const redisConfig = (() => {
+ if (!process.env.REDIS_URL) {
+ return undefined;
+ }
+ return {
+ url: process.env.REDIS_URL,
+ };
+})();
+
class RedisPublisher {
pub: RedisClient;
constructor() {
- this.pub = redis.createClient();
+ this.pub = redis.createClient(redisConfig);
}
sendMessage(target: UpdateTarget, message: RedisMessage) {
@@ -52,7 +61,7 @@
onMessageCallback: OnMessage;
constructor(sessionIdentifier: SessionIdentifier, onMessage: OnMessage) {
- this.sub = redis.createClient();
+ this.sub = redis.createClient(redisConfig);
this.instanceID = uuidv4();
this.onMessageCallback = onMessage;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 9:45 PM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2492894
Default Alt Text
D3850.diff (844 B)
Attached To
Mode
D3850: [keyserver] Make it possible to configure Redis host
Attached
Detach File
Event Timeline
Log In to Comment