Skip to content

Commit

Permalink
[Index Management] Disable wait for completion when executing enrich …
Browse files Browse the repository at this point in the history
…policies (#171190)
  • Loading branch information
sabarasaba committed Nov 15, 2023
1 parent d4b5113 commit b05abd4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ const create = (
};

const execute = (client: IScopedClusterClient, policyName: string) => {
return client.asCurrentUser.enrich.executePolicy({ name: policyName });
// Enrich policy executions can last as short as a few seconds to as long as half and hour or longer.
// In order to prevent the enrich policies UI from timing out, we are disabling `waitForCompletion`.
return client.asCurrentUser.enrich.executePolicy({
name: policyName,
wait_for_completion: false,
});
};

const remove = (client: IScopedClusterClient, policyName: string) => {
Expand Down

0 comments on commit b05abd4

Please sign in to comment.