mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Disabled Collections sync when flag disabled
We've been seeing an increased number of database queries, which are potentially caused by the collections syncing logic. Whilst we haven't narrowed the cause down precisely we want to disable this logic unless the flag is enabled.
This commit is contained in:
parent
afce648fd7
commit
148cf059dc
@ -2,6 +2,7 @@ const {
|
|||||||
CollectionsService
|
CollectionsService
|
||||||
} = require('@tryghost/collections');
|
} = require('@tryghost/collections');
|
||||||
const BookshelfCollectionsRepository = require('./BookshelfCollectionsRepository');
|
const BookshelfCollectionsRepository = require('./BookshelfCollectionsRepository');
|
||||||
|
const labs = require('../../../shared/labs');
|
||||||
|
|
||||||
let inited = false;
|
let inited = false;
|
||||||
class CollectionsServiceWrapper {
|
class CollectionsServiceWrapper {
|
||||||
@ -31,6 +32,9 @@ class CollectionsServiceWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
|
if (!labs.isSet('collections')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (inited) {
|
if (inited) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user