mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Moved initiatialisation of the Recommendation services behind a feature flag (#18429)
no issue
This commit is contained in:
parent
2f09dd8880
commit
7cdf7ce82e
@ -38,6 +38,7 @@ class RecommendationServiceWrapper {
|
||||
return;
|
||||
}
|
||||
|
||||
const labs = require('../../../shared/labs');
|
||||
const config = require('../../../shared/config');
|
||||
const urlUtils = require('../../../shared/url-utils');
|
||||
const models = require('../../models');
|
||||
@ -124,8 +125,10 @@ class RecommendationServiceWrapper {
|
||||
service: this.service
|
||||
});
|
||||
|
||||
if (labs.isSet('recommendations')) {
|
||||
this.service.init().catch(logging.error);
|
||||
this.incomingRecommendationService.init().catch(logging.error);
|
||||
}
|
||||
|
||||
const PATH_SUFFIX = '/.well-known/recommendations.json';
|
||||
|
||||
@ -143,8 +146,6 @@ class RecommendationServiceWrapper {
|
||||
}
|
||||
});
|
||||
|
||||
const labs = require('../../../shared/labs');
|
||||
|
||||
// Listen for incoming webmentions
|
||||
DomainEvents.subscribe(MentionCreatedEvent, async (event) => {
|
||||
if (labs.isSet('recommendations')) {
|
||||
|
Loading…
Reference in New Issue
Block a user