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:
parent
8f86885132
commit
b35eef1b02
2 changed files with 12 additions and 7 deletions
|
@ -78,12 +78,14 @@ function initializeRecurringJobs() {
|
||||||
|
|
||||||
const jobsService = require('./services/jobs');
|
const jobsService = require('./services/jobs');
|
||||||
|
|
||||||
|
if (config.get('backgroundJobs:emailAnalytics')) {
|
||||||
jobsService.scheduleJob(
|
jobsService.scheduleJob(
|
||||||
'every 1 minute',
|
'every 1 minute',
|
||||||
path.resolve(__dirname, 'services', 'email-analytics', 'jobs', 'fetch-latest.js'),
|
path.resolve(__dirname, 'services', 'email-analytics', 'jobs', 'fetch-latest.js'),
|
||||||
undefined,
|
undefined,
|
||||||
'email-analytics-fetch-latest'
|
'email-analytics-fetch-latest'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -115,5 +115,8 @@
|
||||||
"adminFrameProtection": true,
|
"adminFrameProtection": true,
|
||||||
"sendWelcomeEmail": true,
|
"sendWelcomeEmail": true,
|
||||||
"stripeDirect": false,
|
"stripeDirect": false,
|
||||||
"enableStripePromoCodes": false
|
"enableStripePromoCodes": false,
|
||||||
|
"backgroundJobs": {
|
||||||
|
"emailAnalytics": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue