@@ -66,14 +66,8 @@ async function create (message) {
66
66
return _ . assign ( doc . _source , { phases } )
67
67
}
68
68
69
- // NOTE Disable indexing phases when create at the moment, as it's now being indexed inside Project Service.
70
- // It's because adding a phase may cause cascading updates of other phases and in such cases we are doing
71
- // one ES index call instead of multiple calls. Otherwise ES may fail with error `version conflict`.
72
- // This would be turned on back, as soon as we get rid of such cascading updates inside Project Service.
73
- //
74
- // await helper.updateProjectESPromise(message.projectId, updateDocPromise)
75
- // logger.debug(`Project phase created successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
76
- logger . debug ( `TEMPORARY SKIPPED: Project phase created successfully in elasticsearch index, (projectPhaseId: ${ message . id } )` )
69
+ await helper . updateProjectESPromise ( message . projectId , updateDocPromise )
70
+ logger . debug ( `Project phase created successfully in elasticsearch index, (projectPhaseId: ${ message . id } )` )
77
71
}
78
72
79
73
create . schema = {
@@ -97,14 +91,8 @@ async function update (message) {
97
91
return _ . assign ( doc . _source , { phases } )
98
92
}
99
93
100
- // NOTE Disable indexing phases when update at the moment, as it's now being indexed inside Project Service.
101
- // It's because updating a phase may cause cascading updates of other phases and in such cases we are doing
102
- // one ES index call instead of multiple calls. Otherwise ES may fail with error `version conflict`.
103
- // This would be turned on back, as soon as we get rid of such cascading updates inside Project Service.
104
- //
105
- // await helper.updateProjectESPromise(message.projectId, updateDocPromise)
106
- // logger.debug(`Project phase updated successfully in elasticsearch index, (projectPhaseId: ${message.id})`)
107
- logger . debug ( `TEMPORARY SKIPPED: Project phase updated successfully in elasticsearch index, (projectPhaseId: ${ message . id } )` )
94
+ await helper . updateProjectESPromise ( message . projectId , updateDocPromise )
95
+ logger . debug ( `Project phase updated successfully in elasticsearch index, (projectPhaseId: ${ message . id } )` )
108
96
}
109
97
110
98
update . schema = {
0 commit comments