Skip to content

Commit

Permalink
only exclude reindexOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Jan 25, 2022
1 parent c93afea commit 6d29e10
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ export type Credential = Record<string, any>;

// Generates a stable hash for the reindex operation's current state.
const getHash = (reindexOp: ReindexSavedObject) => {
const { reindexOptions, ...attributes } = reindexOp.attributes;
return createHash('sha256')
.update(
stringify({
id: reindexOp.id,
reindexTaskId: reindexOp.attributes.reindexTaskId,
status: reindexOp.attributes.status,
})
)
.update(stringify({ id: reindexOp.id, ...attributes }))
.digest('base64');
};

Expand Down

0 comments on commit 6d29e10

Please sign in to comment.