Skip to content

AsyncExecution.retry is not respecting delays #242

@jhalterman

Description

@jhalterman

Delays appear to not be respected when manually scheduling a retry via an AsyncExecution:

    RetryPolicy<String> retryPolicy = new RetryPolicy<String>().withBackoff(100, 60000, ChronoUnit.MILLIS)
      .withMaxAttempts(10)
      .onFailedAttempt(e -> System.out.println("Failed with " + e));

    Failsafe.with(retryPolicy).runAsyncExecution(exec -> {
      if (!exec.complete(null, new Exception()))
        exec.retry();
    }).get();

Similar when using withDelay.

h/t @thoec

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions