don't log that we sent notifications when nothing set up
This commit is contained in:
parent
a5bd4c4311
commit
c3d8168f49
1 changed files with 4 additions and 2 deletions
|
|
@ -681,6 +681,7 @@ function sendMessage (rec) {
|
||||||
if (pluginType === 'sms') return smsPlugin.sendMessage(rec)
|
if (pluginType === 'sms') return smsPlugin.sendMessage(rec)
|
||||||
throw new Error('No such plugin type: ' + pluginType)
|
throw new Error('No such plugin type: ' + pluginType)
|
||||||
})
|
})
|
||||||
|
|
||||||
return Promise.all(pluginPromises)
|
return Promise.all(pluginPromises)
|
||||||
}
|
}
|
||||||
exports.sendMessage = sendMessage
|
exports.sendMessage = sendMessage
|
||||||
|
|
@ -729,8 +730,9 @@ function checkNotification () {
|
||||||
|
|
||||||
return sendMessage(rec)
|
return sendMessage(rec)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(results => {
|
||||||
logger.debug('Successfully sent alerts')
|
console.log('DEBUG25')
|
||||||
|
if (results.length > 0) logger.debug('Successfully sent alerts')
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
logger.error(err)
|
logger.error(err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue