Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ersin-erdal committed Dec 20, 2022
1 parent 971c936 commit cb1970a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/actions/server/actions_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ export function getActionsConfigurationUtilities(
);

return (
connectorTypeConfig?.maxAttempts ??
config.run?.maxAttempts ??
actionTypeMaxAttempts ??
connectorTypeConfig?.maxAttempts ||
config.run?.maxAttempts ||
actionTypeMaxAttempts ||
DEFAULT_MAX_ATTEMPTS
);
},
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/server/lib/task_runner_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class TaskRunnerFactory {
// Throwing an executor error means we will attempt to retry the task
// TM will treat a task as a failure if `attempts >= maxAttempts`
// so we need to handle that here to avoid TM persisting the failed task
const isRetryableBasedOnAttempts = taskInfo.attempts < (maxAttempts ?? 1);
const isRetryableBasedOnAttempts = taskInfo.attempts < maxAttempts;
const willRetryMessage = `and will retry`;
const willNotRetryMessage = `and will not retry`;

Expand Down

0 comments on commit cb1970a

Please sign in to comment.