0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added kill-switch config for email analytics background jobs

no issue

- it's possible background jobs may cause unintended side-effects so it's useful to have a kill-switch to disable them individually to keep sites working
This commit is contained in:
Kevin Ansfield 2020-12-01 09:10:43 +00:00
parent 8f86885132
commit b35eef1b02
2 changed files with 12 additions and 7 deletions

View file

@ -78,12 +78,14 @@ function initializeRecurringJobs() {
const jobsService = require('./services/jobs'); const jobsService = require('./services/jobs');
jobsService.scheduleJob( if (config.get('backgroundJobs:emailAnalytics')) {
'every 1 minute', jobsService.scheduleJob(
path.resolve(__dirname, 'services', 'email-analytics', 'jobs', 'fetch-latest.js'), 'every 1 minute',
undefined, path.resolve(__dirname, 'services', 'email-analytics', 'jobs', 'fetch-latest.js'),
'email-analytics-fetch-latest' undefined,
); 'email-analytics-fetch-latest'
);
}
} }
/** /**

View file

@ -115,5 +115,8 @@
"adminFrameProtection": true, "adminFrameProtection": true,
"sendWelcomeEmail": true, "sendWelcomeEmail": true,
"stripeDirect": false, "stripeDirect": false,
"enableStripePromoCodes": false "enableStripePromoCodes": false,
"backgroundJobs": {
"emailAnalytics": true
}
} }