0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -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:
Naz 2023-08-30 14:42:11 +08:00 committed by naz
parent cc085bafe9
commit b54191dbe4
2 changed files with 8 additions and 0 deletions

View file

@ -31,6 +31,13 @@ class CollectionsServiceWrapper {
}
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) {
return;
}

View file

@ -8,6 +8,7 @@ describe('Posts Bulk API', function () {
before(async function () {
mockManager.mockLabsEnabled('collections');
agent = await agentProvider.getAdminAPIAgent();
// Note that we generate lots of fixtures here to test the bulk deletion correctly