Commit 449ed021da11bd00683aa69303376b196e8a43e5
1 parent
17e5c940e4
Exists in
master
Perbaikan redis client di messages-archive
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
lib/messages-archive.js
... | ... | @@ -9,10 +9,12 @@ const db = require('./db-mysql'); |
9 | 9 | const DIRECTION_INCOMING = 0; |
10 | 10 | const DIRECTION_OUTGOING = 1; |
11 | 11 | |
12 | -const redisClient = config.redis && redis.createClient(config.redis); | |
12 | +let redisClient; | |
13 | 13 | |
14 | 14 | if (!config.redis) { |
15 | 15 | logger.warn('Undefined config.redis, messages counter will not work! #05A778E21D7E'); |
16 | +} else { | |
17 | + redisClient = redis.createClient(config.redis); | |
16 | 18 | } |
17 | 19 | |
18 | 20 | if (!redisClient) { |