Skip to content

Commit 951b6ac

Browse files
author
vikasrohit
authored
Merge pull request #507 from topcoder-platform/hotfix/additional_logs_for_team_updated_event
Hotfix/additional logs for team updated event
2 parents cf55217 + ea0cd36 commit 951b6ac

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
@@ -197,7 +197,9 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
197197
// first get the existing document and than merge the updated changes and save the new document
198198
try {
199199
const doc = await eClient.get({ index: ES_PROJECT_INDEX, type: ES_PROJECT_TYPE, id: previousValue.id });
200+
console.log(doc, 'Received project from ES');
200201
const merged = _.merge(doc._source, project.get({ plain: true })); // eslint-disable-line no-underscore-dangle
202+
console.log(merged, 'Merged project');
201203
// update the merged document
202204
await eClient.update({
203205
index: ES_PROJECT_INDEX,
@@ -207,6 +209,7 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
207209
doc: merged,
208210
},
209211
});
212+
console.log(`Succesfully updated project document in ES (projectId: ${previousValue.id})`);
210213
} catch (error) {
211214
throw Error(`failed to updated project document in elasitcsearch index (projectId: ${previousValue.id})` +
212215
`. Details: '${error}'.`);

0 commit comments

Comments
 (0)