Added config flag to disable recommendations service (#20879)
no ref This service can get rather noisy when doing local development with our data generator, as we do not use real urls, and therefore generate a lot of not found errors in the console.
This commit is contained in:
parent
79f4b523ac
commit
c2ae91e4db
@ -39,11 +39,16 @@ class RecommendationServiceWrapper {
|
|||||||
incomingRecommendationService;
|
incomingRecommendationService;
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
const config = require('../../../shared/config');
|
||||||
|
if (config.get('services:recommendations:enabled') === false) {
|
||||||
|
logging.info('[Recommendations] Service is disabled via config');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.repository) {
|
if (this.repository) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = require('../../../shared/config');
|
|
||||||
const urlUtils = require('../../../shared/url-utils');
|
const urlUtils = require('../../../shared/url-utils');
|
||||||
const models = require('../../models');
|
const models = require('../../models');
|
||||||
const sentry = require('../../../shared/sentry');
|
const sentry = require('../../../shared/sentry');
|
||||||
|
Loading…
Reference in New Issue
Block a user