Exemple #1
0
 sendSlack(results.slack, results.render, notification, function (err, data) {
   if (err) {
     notification.log = err;
     notification.state = 'FAILED';
     logger.warn('slack send error', err)
   } else {
     notification.log = data;
     notification.state = 'COMPLETE';
     logger.info('slack send complete', data)
   }
   db.notificationDelivery.updateById(notification.id, notification, cb);
 });
Exemple #2
0
 sendVoice(results.s3, results.twilio, notification, function (err, data) {
   if (err) {
     notification.log = err;
     notification.state = 'FAILED';
     logger.warn('voice send error', err);
   } else {
     notification.log = data;
     notification.state = 'COMPLETE';
     logger.info('voice send complete', data);
   }
   db.notificationDelivery.updateById(notification.id, notification, cb);
 });