|
|
@ -9,6 +9,7 @@ var async = require('async'),
|
|
|
|
user = require('../user'),
|
|
|
|
user = require('../user'),
|
|
|
|
topics = require('../topics'),
|
|
|
|
topics = require('../topics'),
|
|
|
|
batch = require('../batch'),
|
|
|
|
batch = require('../batch'),
|
|
|
|
|
|
|
|
plugins = require('../plugins'),
|
|
|
|
emailer = require('../emailer'),
|
|
|
|
emailer = require('../emailer'),
|
|
|
|
utils = require('../../public/src/utils');
|
|
|
|
utils = require('../../public/src/utils');
|
|
|
|
|
|
|
|
|
|
|
@ -19,6 +20,10 @@ var async = require('async'),
|
|
|
|
return winston.verbose('[user/jobs] Did not send digests (' + interval + ') because subscription system is disabled.');
|
|
|
|
return winston.verbose('[user/jobs] Did not send digests (' + interval + ') because subscription system is disabled.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!plugins.hasListeners('action:email.send')) {
|
|
|
|
|
|
|
|
return winston.error('[user/jobs] Did not send digests (' + interval + ') because no active email plugin was found.');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!interval) {
|
|
|
|
if (!interval) {
|
|
|
|
// interval is one of: day, week, month, or year
|
|
|
|
// interval is one of: day, week, month, or year
|
|
|
|
interval = 'day';
|
|
|
|
interval = 'day';
|
|
|
|