Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3381973
D3850.id11900.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.id11900.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
Fri, Nov 29, 7:41 AM (19 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596340
Default Alt Text
D3850.id11900.diff (844 B)
Attached To
Mode
D3850: [keyserver] Make it possible to configure Redis host
Attached
Detach File
Event Timeline
Log In to Comment