Skip to content

Commit 977c61d

Browse files
author
vikasrohit
authored
Merge pull request #511 from topcoder-platform/hotfix/additional_logs_for_team_updated_event
Hotfix/additional logs for team updated event
2 parents f6145ad + ebf967e commit 977c61d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/events/projects/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
172172
// first get the existing document and than merge the updated changes and save the new document
173173
try {
174174
const doc = await eClient.get({ index: ES_PROJECT_INDEX, type: ES_PROJECT_TYPE, id: previousValue.id });
175+
console.log(doc._source, 'Received project from ES');// eslint-disable-line no-underscore-dangle
175176
const merged = _.merge(doc._source, project.get({ plain: true })); // eslint-disable-line no-underscore-dangle
177+
console.log(merged, 'Merged project');
176178
// update the merged document
177179
await eClient.update({
178180
index: ES_PROJECT_INDEX,
@@ -182,6 +184,7 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
182184
doc: merged,
183185
},
184186
});
187+
console.log(`Succesfully updated project document in ES (projectId: ${previousValue.id})`);
185188
} catch (error) {
186189
throw Error(`failed to updated project document in elasitcsearch index (projectId: ${previousValue.id})` +
187190
`. Details: '${error}'.`);

0 commit comments

Comments
 (0)