Skip to content

Commit

Permalink
refactor(recommendation): change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Veirt committed Dec 10, 2024
1 parent ea9d90d commit d6ac411
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ export const FACE_VALIDATION_ENABLED = !!FACE_VALIDATION_URL;
export const ABUSIVE_DETECTION_URL = process.env.ABUSIVE_DETECTION_URL;
export const ABUSIVE_DETECTION_ENABLED = !!ABUSIVE_DETECTION_URL;

export const RECOMMENDATION_URL = process.env.RECOMMENDATION_URL;
export const RECOMMENDATION_ENABLED = !!RECOMMENDATION_URL;
export const SYSTEM_RECOMMENDER_URL = process.env.SYSTEM_RECOMMENDER_URL;
export const SYSTEM_RECOMMENDER_ENABLED = !!SYSTEM_RECOMMENDER_URL;
8 changes: 4 additions & 4 deletions src/module/recommendation/recommendation.factory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RECOMMENDATION_ENABLED, RECOMMENDATION_URL } from "@/config";
import { SYSTEM_RECOMMENDER_ENABLED, SYSTEM_RECOMMENDER_URL } from "@/config";
import {
RemoteRecommendationService,
InterestRecommendationService,
Expand All @@ -12,7 +12,7 @@ export const createRecommendationService = (
learnerRepository: LearnerRepository,
tutoriesRepository: TutoriesRepository,
) => {
if (process.env.NODE_ENV === "test" || !RECOMMENDATION_ENABLED) {
if (process.env.NODE_ENV === "test" || !SYSTEM_RECOMMENDER_ENABLED) {
logger.info(
"Recommendation service is disabled, using simple interest-matching service",
);
Expand All @@ -22,11 +22,11 @@ export const createRecommendationService = (
);
}

const service = new RemoteRecommendationService(RECOMMENDATION_URL!);
const service = new RemoteRecommendationService(SYSTEM_RECOMMENDER_URL!);

try {
axios
.get(`${RECOMMENDATION_URL}/health`, {
.get(`${SYSTEM_RECOMMENDER_URL}/health`, {
timeout: 5000,
})
.catch(() => {
Expand Down

0 comments on commit d6ac411

Please sign in to comment.