mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05: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
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@ const {
|
|||
CollectionsService
|
||||
} = require('@tryghost/collections');
|
||||
const BookshelfCollectionsRepository = require('./BookshelfCollectionsRepository');
|
||||
const labs = require('../../../shared/labs');
|
||||
|
||||
let inited = false;
|
||||
class CollectionsServiceWrapper {
|
||||
|
@ -31,6 +32,9 @@ class CollectionsServiceWrapper {
|
|||
}
|
||||
|
||||
async init() {
|
||||
if (!labs.isSet('collections')) {
|
||||
return;
|
||||
}
|
||||
if (inited) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue