Type Alias RetrySettings<TParameters, TContext>

RetrySettings: {
    backoffPolicy?: BackoffPolicy;
    maxAttempts?: number;
    onExecutionAttempt?: OnExecutionAttempt<TParameters, TContext>;
    onRetryEnd?: OnRetry<TParameters, TContext>;
    onRetryStart?: OnRetry<TParameters, TContext>;
    retryPolicy?: RetryPolicy;
}

IMPORT_PATH: "@daiso-tech/core/async"

Type Parameters

Type declaration

  • OptionalbackoffPolicy?: BackoffPolicy
    import { exponentialBackoffPolicy } from "@daiso-tech/core/async";

    exponentialBackoffPolicy();
  • OptionalmaxAttempts?: number

    You can decide maximal times you can retry.

    {4}
    
  • OptionalonExecutionAttempt?: OnExecutionAttempt<TParameters, TContext>

    Callback function that will be called before execution attempt.

  • OptionalonRetryEnd?: OnRetry<TParameters, TContext>

    Callback function that will be called when the retry delay ends and before the next execution attempt.

  • OptionalonRetryStart?: OnRetry<TParameters, TContext>

    Callback function that will be called when the retry delay starts.

  • OptionalretryPolicy?: RetryPolicy

    You can choose what errors you want to retry. By default all erros will be retried.

    () => true