Page MenuHomePhabricator

D3850.id11900.diff
No OneTemporary

D3850.id11900.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
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)

Event Timeline