Skip to content
Browse files

Merge pull request #320 from joemiller/cluster_proxy

add additional logging
  • Loading branch information...
2 parents 953c80b + 5c0ba74 commit ef77751c4d6f7b036d0ccd86074c26a21779a635 @mrtazz mrtazz committed Aug 1, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 proxy.js
View
11 proxy.js
@@ -109,9 +109,12 @@ configlib.configFile(process.argv[2], function (conf, oldConfig) {
}
} else {
if (node_status[node_id] !== undefined) {
- var new_server = {};
- new_server[node_id] = 100;
- ring.add(new_server);
+ if (node_status[node_id] > 0) {
+ var new_server = {};
+ new_server[node_id] = 100;
+ l.log('Adding node ' + node_id + ' to the ring.');
+ ring.add(new_server);
+ }
}
node_status[node_id] = 0;
}
@@ -128,7 +131,7 @@ configlib.configFile(process.argv[2], function (conf, oldConfig) {
ring.remove(node_id);
}
} else {
- l.log('Errored with ' + e.code);
+ l.log('Error during healthcheck on node ' + node_id + ' with ' + e.code);
}
});
}

0 comments on commit ef77751

Please sign in to comment.
Something went wrong with that request. Please try again.