Skip to content

Commit

Permalink
env sample fields set with proper values
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-tunerlabs committed Apr 21, 2021
1 parent 21a1425 commit 92a14e3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ INTERNAL_ACCESS_TOKEN = "Internal access token to access reports"
# Kafka Configuration
KAFKA_COMMUNICATIONS_ON_OFF = "ON/OFF" // Kafka enable or disable communication flag
KAFKA_URL = "100.0.0.1:9092" // IP address of kafka server with port without HTTP
SUBMISSION_RATING_QUEUE_TOPIC = "OFF/TOPIC_NAME" // Kafka topic name for pushing submissions for which rating has to be done.
COMPLETED_OBSERVATION_SUBMISSION_TOPIC = "OFF/TOPIC_NAME" // Kafka topic name for pushing completed observation submission
INCOMPLETE_OBSERVATION_SUBMISSION_TOPIC = "OFF/TOPIC_NAME" // Kafka topic name for pushing incomplete observation submission
COMPLETED_SURVEY_SUBMISSION_TOPIC = "OFF/TOPIC_NAME" // Kafka topic name for completed survey submission
INCOMPLETE_SURVEY_SUBMISSION_TOPIC = "OFF/TOPIC_NAME" // Kafka topic name for incomplete survey submission
SUBMISSION_RATING_QUEUE_TOPIC = "dev.sl.submission.rating.raw" // Kafka topic name for pushing submissions for which rating has to be done.
COMPLETED_OBSERVATION_SUBMISSION_TOPIC = "dev.sl.observation.raw" // Kafka topic name for pushing completed observation submission
INCOMPLETE_OBSERVATION_SUBMISSION_TOPIC = "dev.sl.incomplete.observation.raw" // Kafka topic name for pushing incomplete observation submission
COMPLETED_SURVEY_SUBMISSION_TOPIC = "dev.sl.survey.raw" // Kafka topic name for completed survey submission
INCOMPLETE_SURVEY_SUBMISSION_TOPIC = "dev.sl.incomplete.survey.raw" // Kafka topic name for incomplete survey submission
KAFKA_GROUP_ID = "survey" // Kafka consumer group for ML Survey Service
IMPROVEMENT_PROJECT_SUBMISSION_TOPIC = "" // Kafka topic name for pushing project submission related data
IMPROVEMENT_PROJECT_SUBMISSION_TOPIC = "dev.sl.improvement.project.submission" // Kafka topic name for pushing project submission related data

# Elastic search configurations
ELASTICSEARCH_COMMUNICATIONS_ON_OFF = "ON/OFF" // Elastic search enable/disable flag E.g. ON/OFF
ELASTICSEARCH_COMMUNICATIONS_ON_OFF = "ON" // Elastic search enable/disable flag E.g. ON/OFF
ELASTICSEARCH_HOST_URL = "http://127.0.0.1:9200" // Elastic search host url
ELASTIC_SEARCH_SNIFF_ON_START = true/false // Flag to obtain ES Nodes list at the time of connection e.g. true/false
ELASTICSEARCH_ENTITIES_INDEX = "entities" // Elastic search index name for storing entity data
Expand Down
2 changes: 1 addition & 1 deletion envVariables.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let table = require("cli-table");
var Log = require("log");
const Log = require("log");

let log = new Log("debug");

Expand Down
3 changes: 2 additions & 1 deletion generics/messageConstants/endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ module.exports = {
GET_USERS_BY_ENTITY_AND_ROLE : "api/v1/entities/getUsersByEntityAndRole", //kendra service
SOLUTIONS_BASED_ON_ROLE_LOCATION : "api/v1/solutions/forUserRoleAndLocation",
SOLUTION_DETAILS_BASED_ON_ROLE_LOCATION : "api/v1/solutions/detailsBasedOnRoleAndLocation",
GET_PROJECT_TEMPLATE_LISTS : "api/v1/project/templates/listByIds"
GET_PROJECT_TEMPLATE_LISTS : "api/v1/project/templates/listByIds",
USER_READ : "/api/user/v1/read"
}
5 changes: 2 additions & 3 deletions module/shikshalokam/helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const Request = require(GENERIC_HELPERS_PATH + '/httpRequest');
const userProfileFetchEndpoint = "/api/user/v1/read";
const shikshalokamBaseHost = process.env.USER_SERVICE_URL;
const userOrganisationHelper = require(MODULES_BASE_PATH + "/userOrganisations/helper");

Expand Down Expand Up @@ -64,7 +63,7 @@ module.exports = class ShikshalokamHelper {
return new Promise(async (resolve, reject) => {
try {

if (shikshalokamBaseHost == "" || userProfileFetchEndpoint == "") {
if (shikshalokamBaseHost == "" || messageConstants.endpoints.USER_READ == "") {
throw new Error("User Profile read configuration is missing.");
}

Expand All @@ -74,7 +73,7 @@ module.exports = class ShikshalokamHelper {
shikshalokamBaseHostUrl = "https://"+shikshalokamBaseHost
}

return resolve(shikshalokamBaseHostUrl + userProfileFetchEndpoint + "/" + keycloakUserId);
return resolve(shikshalokamBaseHostUrl + messageConstants.endpoints.USER_READ + "/" + keycloakUserId);

} catch (error) {
return reject({
Expand Down

0 comments on commit 92a14e3

Please sign in to comment.