Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 835878c

Browse files
Revert "Update ES updates to wait for index to refresh before returning with response"
This reverts commit 5fb8950.
1 parent d6a48bc commit 835878c

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/common/helper.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ async function updateUser (userId, body) {
8989
index: config.get('ES.USER_INDEX'),
9090
type: config.get('ES.USER_TYPE'),
9191
id: userId,
92-
body: { doc: body },
93-
refresh: 'wait_for'
92+
body: { doc: body }
9493
})
9594
}
9695

@@ -115,8 +114,7 @@ async function updateOrg (organizationId, body) {
115114
index: config.get('ES.ORGANIZATION_INDEX'),
116115
type: config.get('ES.ORGANIZATION_TYPE'),
117116
id: organizationId,
118-
body: { doc: body },
119-
refresh: 'wait_for'
117+
body: { doc: body }
120118
})
121119
}
122120

src/services/ProcessorService.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function processCreate (message) {
2727
type: topResources[resource].type,
2828
id: message.payload.id,
2929
body: _.omit(message.payload, 'resource'),
30-
refresh: 'wait_for'
30+
refresh: 'true'
3131
})
3232
} else if (_.includes(_.keys(userResources), resource)) {
3333
// process user resources such as userSkill, userAttribute...
@@ -102,8 +102,7 @@ async function processUpdate (message) {
102102
id,
103103
body: {
104104
doc: _.assign(source, _.omit(message.payload, 'resource'))
105-
},
106-
refresh: 'wait_for'
105+
}
107106
})
108107
} else if (_.includes(_.keys(userResources), resource)) {
109108
// process user resources such as userSkill, userAttribute...
@@ -175,7 +174,7 @@ async function processDelete (message) {
175174
index: topResources[resource].index,
176175
type: topResources[resource].type,
177176
id: message.payload.id,
178-
refresh: 'wait_for'
177+
refresh: 'true'
179178
})
180179
} else if (_.includes(_.keys(userResources), resource)) {
181180
// process user resources such as userSkill, userAttribute...

0 commit comments

Comments
 (0)