retry

A tiny library for retrying failing operations.

  • Owner: igorw/retry
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

retry

A tiny library for retrying failing operations.

Since the network is reliable, things should always work. Am I right? For those cases when they don't, there is retry.

<?
use function igorw\retry;

// retry an operation up to 5 times
$user = retry(5, function () use ($id) {
    return User::find($id);
});

// here is why you want to start using HHVM
$user = retry(5, () ==> User::find($id));

// this is probably a bad idea
$user = retry(INF, () ==> {
    throw new RuntimeException('never gonna give you up');
});
?>

I know. You're welcome.

Main metrics

Overview
Name With Ownerigorw/retry
Primary LanguagePHP
Program languagePHP (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-09-19 21:48:06
Pushed At2020-01-31 21:05:42
Last Commit At2014-09-20 13:10:31
Release Count0
用户参与
Stargazers Count541
Watchers Count19
Fork Count26
Commits Count3
Has Issues Enabled
Issues Count5
Issue Open Count2
Pull Requests Count0
Pull Requests Open Count3
Pull Requests Close Count6
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private