You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by be...@apache.org on 2017/07/10 18:11:01 UTC

[incubator-openwhisk-package-alarms] branch master updated: Handle redis publish/subscribe connection error (#72)

This is an automated email from the ASF dual-hosted git repository.

berstler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-alarms.git


The following commit(s) were added to refs/heads/master by this push:
     new a8f7bfc  Handle redis publish/subscribe connection error (#72)
a8f7bfc is described below

commit a8f7bfc98fbef9cb0f0242388b0889703ba94940
Author: Jason Peterson <ja...@us.ibm.com>
AuthorDate: Mon Jul 10 13:10:59 2017 -0500

    Handle redis publish/subscribe connection error (#72)
---
 provider/app.js       | 2 +-
 provider/lib/utils.js | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/provider/app.js b/provider/app.js
index ecfe146..1d9ea20 100755
--- a/provider/app.js
+++ b/provider/app.js
@@ -106,7 +106,7 @@ function createRedisClient() {
             });
 
             client.on("error", function (err) {
-                logger.error(method, 'Error creating redis', err);
+                logger.error(method, 'Error connecting to redis', err);
                 reject(err);
             });
         }
diff --git a/provider/lib/utils.js b/provider/lib/utils.js
index dcbdad5..5008c70 100644
--- a/provider/lib/utils.js
+++ b/provider/lib/utils.js
@@ -360,6 +360,11 @@ module.exports = function(
                     }
                 });
 
+                subscriber.on("error", function (err) {
+                    logger.error(method, 'Error connecting to redis', err);
+                    reject(err);
+                });
+
                 subscriber.subscribe(utils.redisHash);
 
                 redisClient.hgetAsync(utils.redisHash, utils.redisKey)

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].