mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added killswitch for collection sync functionality
refs https://github.com/TryGhost/Arch/issues/80
refs 3960bfac1d
- The killswitch (a setting in host settings) is needed to control the feature on a hosted environment, so we can safely turn it off if it causes any major issues.
This commit is contained in:
parent
cc085bafe9
commit
b54191dbe4
2 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,13 @@ class CollectionsServiceWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
|
const config = require('../../../shared/config');
|
||||||
|
const labs = require('../../../shared/labs');
|
||||||
|
// host setting OR labs "collections" flag has to be enabled to run collections service
|
||||||
|
if (!config.get('hostSettings:collections:enabled') && !(labs.isSet('collections'))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (inited) {
|
if (inited) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ describe('Posts Bulk API', function () {
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
mockManager.mockLabsEnabled('collections');
|
mockManager.mockLabsEnabled('collections');
|
||||||
|
|
||||||
agent = await agentProvider.getAdminAPIAgent();
|
agent = await agentProvider.getAdminAPIAgent();
|
||||||
|
|
||||||
// Note that we generate lots of fixtures here to test the bulk deletion correctly
|
// Note that we generate lots of fixtures here to test the bulk deletion correctly
|
||||||
|
|
Loading…
Add table
Reference in a new issue