From 78d819eb78a8615fed7c8145398564e10679fe7e Mon Sep 17 00:00:00 2001 From: Josh Harvey Date: Tue, 31 May 2016 16:05:14 +0300 Subject: [PATCH] fix notify bug --- lib/notifier.js | 5 +---- lib/plugins.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/notifier.js b/lib/notifier.js index 7e87335a..b6cfe0a9 100644 --- a/lib/notifier.js +++ b/lib/notifier.js @@ -81,7 +81,7 @@ function checkStuckScreen (deviceEvents) { } function devicesAndEvents () { - return Promise.all(db.devices, db.machineEvents) + return Promise.all([db.devices(), db.machineEvents()]) .then(arr => ({devices: arr[0], events: arr[1]})) } @@ -111,9 +111,6 @@ function checkStatus () { return alerts }) - .catch(function (err) { - console.log(err.stack) - }) } exports.checkStatus = checkStatus diff --git a/lib/plugins.js b/lib/plugins.js index 7b5b69d3..2dd90bc0 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -503,7 +503,7 @@ function pollBalance (cryptoCode, cb) { walletPlugin.balance(function (err, balance) { if (err) { - logger.error(err) + logger.error('[%s] Error loading balance: %s', cryptoCode, err.message) return cb && cb(err) }