notifications.js style

v1.18.x
Barış Soner Uşaklı 8 years ago
parent f3deef4931
commit b18b0db5be

@ -15,8 +15,9 @@ var batch = require('./batch');
var plugins = require('./plugins'); var plugins = require('./plugins');
var utils = require('./utils'); var utils = require('./utils');
(function (Notifications) { var Notifications = module.exports;
Notifications.init = function () {
Notifications.startJobs = function () {
winston.verbose('[notifications.init] Registering jobs.'); winston.verbose('[notifications.init] Registering jobs.');
new cron('*/30 * * * *', Notifications.prune, null, true); new cron('*/30 * * * *', Notifications.prune, null, true);
}; };
@ -510,5 +511,3 @@ var utils = require('./utils');
callback(err, data.notifications); callback(err, data.notifications);
}); });
}; };
}(exports));

@ -48,7 +48,7 @@ start.start = function () {
require('./socket.io').init(webserver.server); require('./socket.io').init(webserver.server);
if (nconf.get('isPrimary') === 'true' && !nconf.get('jobsDisabled')) { if (nconf.get('isPrimary') === 'true' && !nconf.get('jobsDisabled')) {
require('./notifications').init(); require('./notifications').startJobs();
require('./user').startJobs(); require('./user').startJobs();
} }

Loading…
Cancel
Save