mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added emailAnalytics config feature flag (#12443)
no issue - email analytics may be desirable to fully switch off in certain circumstances, when that happens we want to prevent related background jobs from running and expose the feature flag via the config endpoint in the Admin API so that clients can adjust accordingly
This commit is contained in:
parent
2951eb9eaf
commit
f802128cfc
4 changed files with 5 additions and 2 deletions
|
@ -20,7 +20,8 @@ module.exports = {
|
|||
clientExtensions: config.get('clientExtensions') || {},
|
||||
enableDeveloperExperiments: config.get('enableDeveloperExperiments') || false,
|
||||
stripeDirect: config.get('stripeDirect'),
|
||||
mailgunIsConfigured: config.get('bulkEmail') && config.get('bulkEmail').mailgun
|
||||
mailgunIsConfigured: config.get('bulkEmail') && config.get('bulkEmail').mailgun,
|
||||
emailAnalytics: config.get('emailAnalytics')
|
||||
};
|
||||
if (billingUrl) {
|
||||
response.billingUrl = billingUrl;
|
||||
|
|
|
@ -10,6 +10,7 @@ module.exports = {
|
|||
async scheduleRecurringJobs() {
|
||||
if (
|
||||
!hasScheduled &&
|
||||
config.get('emailAnalytics') &&
|
||||
config.get('backgroundJobs:emailAnalytics') &&
|
||||
!process.env.NODE_ENV.match(/^testing/)
|
||||
) {
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
"sendWelcomeEmail": true,
|
||||
"stripeDirect": false,
|
||||
"enableStripePromoCodes": false,
|
||||
"emailAnalytics": true,
|
||||
"backgroundJobs": {
|
||||
"emailAnalytics": true
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ const expectedProperties = {
|
|||
|
||||
action: ['id', 'resource_type', 'actor_type', 'event', 'created_at', 'actor'],
|
||||
|
||||
config: ['version', 'environment', 'database', 'mail', 'labs', 'clientExtensions', 'enableDeveloperExperiments', 'useGravatar', 'stripeDirect'],
|
||||
config: ['version', 'environment', 'database', 'mail', 'labs', 'clientExtensions', 'enableDeveloperExperiments', 'useGravatar', 'stripeDirect', 'emailAnalytics'],
|
||||
|
||||
post: _(schema.posts)
|
||||
.keys()
|
||||
|
|
Loading…
Add table
Reference in a new issue