mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +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
|
||||
} = 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…
Reference in New Issue
Block a user