Page MenuHomePhabricator

D3850.diff
No OneTemporary

D3850.diff

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

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)

Event Timeline