mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-24 07:16:26 +00:00
make webui resilient to redis errors
This commit is contained in:
@@ -8,6 +8,9 @@ app.get('/', function (req, res) {
|
||||
|
||||
app.get('/json', function (req, res) {
|
||||
var client = redis.createClient(6379, 'redis');
|
||||
client.on("error", function (err) {
|
||||
console.error("Error connecting to redis", err);
|
||||
});
|
||||
client.hlen('wallet', function (err, coins) {
|
||||
client.get('hashes', function (err, hashes) {
|
||||
var now = Date.now() / 1000;
|
||||
|
||||
Reference in New Issue
Block a user