Commit 2d655fbec962d15300bdb1b54927d74118a0b839
1 parent
cd2230271d
Exists in
master
create redisClient
Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff
partner-trustlink.js
... | ... | @@ -34,6 +34,7 @@ function start(_config, _callbackReport, options) { |
34 | 34 | }); |
35 | 35 | } |
36 | 36 | |
37 | + createRedisClient(); | |
37 | 38 | createReverseReportServer(); |
38 | 39 | } |
39 | 40 | |
... | ... | @@ -208,6 +209,14 @@ function topupRequest(task, retry) { |
208 | 209 | }); |
209 | 210 | } |
210 | 211 | |
212 | +function createRedisClient() { | |
213 | + try { | |
214 | + redisClient = redis.createClient(config.globals.redis_port, config.globals.redis_host); | |
215 | + } catch(err) { | |
216 | + logger.info("Error creating redis client"); | |
217 | + } | |
218 | +} | |
219 | + | |
211 | 220 | exports.start = start; |
212 | 221 | exports.topupRequest = topupRequest; |
213 | 222 | exports.calculateSignature = calculateSignature; |