This commit is contained in:
Gabriel Bazán 2016-01-04 14:47:57 -03:00
parent bfc49c94f8
commit b193685b41
4 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ var BlockchainExplorer = require('./blockchainexplorer');
var Model = require('./model');
var PUSHNOTIFICATION_TYPES = {
var PUSHNOTIFICATIONS_TYPES = {
'NewCopayer': {
filename: 'new_copayer',
notifyDoer: false,
@ -46,9 +46,9 @@ var PUSHNOTIFICATION_TYPES = {
},
};
function PushNotificationService() {};
function PushNotificationsService() {};
PushNotificationService.prototype.start = function(opts, cb) {
PushNotificationsService.prototype.start = function(opts, cb) {
var self = this;
async.parallel([
function(done) {
@ -64,9 +64,9 @@ PushNotificationService.prototype.start = function(opts, cb) {
});
};
PushNotificationService.prototype.sendPushNotification = function(notification, cb) {
PushNotificationsService.prototype.sendPushNotifications = function(notification, cb) {
console.log(notification);
if (PUSHNOTIFICATION_TYPES[notification.type] == notification.type) {
if (PUSHNOTIFICATIONS_TYPES[notification.type] == notification.type) {
if (notification.type == 'NewIncomingTx') {
var opts = {};
@ -158,4 +158,4 @@ PushNotificationService.prototype.sendPushNotification = function(notification,
}
};
module.exports = PushNotificationService;
module.exports = PushNotificationsService;

View File

@ -7,10 +7,10 @@ var log = require('npmlog');
log.debug = log.verbose;
var config = require('../config');
var PushNotificationService = require('../lib/pushnotificationservice');
var PushNotificationService = require('../lib/pushnotificationsservice');
var PushNotificationService = new PushNotificationService();
PushNotificationService.start(config, function(err) {
var PushNotificationsService = new PushNotificationsService();
PushNotificationsService.start(config, function(err) {
if (err) throw err;
console.log('Push Notification Service started');

View File

@ -33,6 +33,6 @@ run_program locker/locker.js pids/locker.pid logs/locker.log
run_program messagebroker/messagebroker.js pids/messagebroker.pid logs/messagebroker.log
run_program bcmonitor/bcmonitor.js pids/bcmonitor.pid logs/bcmonitor.log
run_program emailservice/emailservice.js pids/emailservice.pid logs/emailservice.log
run_program pushnotificationservice/pushnotificationservice.js pids/pushnotificationservice.pid logs/pushnotificationservice.log
run_program pushnotificationsservice/pushnotificationsservice.js pids/pushnotificationsservice.pid logs/pushnotificationsservice.log
run_program bws.js pids/bws.pid logs/bws.log

View File

@ -13,7 +13,7 @@ stop_program ()
stop_program pids/bws.pid
stop_program pids/emailservice.pid
stop_program pids/bcmonitor.pid
stop_program pids/pushnotificationservice.pid
stop_program pids/pushnotificationsservice.pid
stop_program pids/messagebroker.pid
stop_program pids/locker.pid