vkartaviy / retry
The library for repeatable and retryable operations
Installs: 186 644
Dependents: 3
Suggesters: 0
Security: 0
Stars: 29
Watchers: 3
Forks: 2
Open Issues: 1
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-10-26 18:22:39 UTC
README
The library for repeatable and retryable operations.
Here is a simple example:
<?php use Retry\RetryProxy; use Retry\Policy\SimpleRetryPolicy; use Retry\BackOff\ExponentialBackOffPolicy; $retryPolicy = new SimpleRetryPolicy(3); $backOffPolicy = new ExponentialBackOffPolicy(); $proxy = new RetryProxy($retryPolicy, $backOffPolicy); $result = $proxy->call(function() { // call external service and return result });