Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #33 from nearform/fix-parallel-run
Browse files Browse the repository at this point in the history
fix: run post-reindex checks in parallel
  • Loading branch information
temsa committed Jun 21, 2018
2 parents fafbf08 + 814f088 commit 15adac4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ exports.update = async (name, { body } = { body: {} }) => {
await reindex(name, sourceIndex, index, rollbackFromReindex, ops)
try {
ops.postReindex = await Promise.all([
await getOps((ops) => checkIndexAlreadyExists(sourceIndex, ops)),
await getOps((ops) => checkIndexAlreadyExists(index, ops)),
await getOps((ops) => checkAliasAlreadyExists(name, ops))
getOps((ops) => checkIndexAlreadyExists(sourceIndex, ops)),
getOps((ops) => checkIndexAlreadyExists(index, ops)),
getOps((ops) => checkAliasAlreadyExists(name, ops))
])
} catch (error) {
const origin = `the checks after ${sourceIndex} reindexation to ${index}, and before the switch of ${name} alias`
Expand Down

0 comments on commit 15adac4

Please sign in to comment.