nsleta/exponential_backoff

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 1

pkg:composer/nsleta/exponential_backoff

v1.0.1 2021-11-26 12:52 UTC

This package is not auto-updated.

Last update: 2025-10-14 02:35:50 UTC


README

Installation

composer require nsleta/exponential_backoff

Usage

    $retry = new ExponentialBackoff\Retry();
    $retry->setInterval(3000); // optional, default interval is 2000
    $retry->setMaxAttempts(2); // optional, default max attempts is 3
    $result = $retry->call(function() { return 'done'; }, [RuntimeException::class]);