nsleta / exponential_backoff
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
pkg:composer/nsleta/exponential_backoff
Requires
- php: >=7.1
Requires (Dev)
- phpstan/phpstan: ^1
- phpunit/phpunit: ^8.5
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]);