Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions src/services/ProcessorServicePhase.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,8 @@ async function create (message) {
return _.assign(doc._source, { phases })
}

// NOTE Disable indexing phases when create at the moment, as it's now being indexed inside Project Service.
// It's because adding a phase may cause cascading updates of other phases and in such cases we are doing
// one ES index call instead of multiple calls. Otherwise ES may fail with error `version conflict`.
// This would be turned on back, as soon as we get rid of such cascading updates inside Project Service.
//
// await helper.updateProjectESPromise(message.projectId, updateDocPromise)
// logger.debug(`Project phase created successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
logger.debug(`TEMPORARY SKIPPED: Project phase created successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
await helper.updateProjectESPromise(message.projectId, updateDocPromise)
logger.debug(`Project phase created successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
}

create.schema = {
Expand All @@ -97,14 +91,8 @@ async function update (message) {
return _.assign(doc._source, { phases })
}

// NOTE Disable indexing phases when update at the moment, as it's now being indexed inside Project Service.
// It's because updating a phase may cause cascading updates of other phases and in such cases we are doing
// one ES index call instead of multiple calls. Otherwise ES may fail with error `version conflict`.
// This would be turned on back, as soon as we get rid of such cascading updates inside Project Service.
//
// await helper.updateProjectESPromise(message.projectId, updateDocPromise)
// logger.debug(`Project phase updated successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
logger.debug(`TEMPORARY SKIPPED: Project phase updated successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
await helper.updateProjectESPromise(message.projectId, updateDocPromise)
logger.debug(`Project phase updated successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
}

update.schema = {
Expand Down