retry

A tiny library for retrying failing operations.

  • 所有者: igorw/retry
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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.

主要指標

概覽
名稱與所有者igorw/retry
主編程語言PHP
編程語言PHP (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2014-09-19 21:48:06
推送於2020-01-31 21:05:42
最后一次提交2014-09-20 13:10:31
發布數0
用户参与
星數541
關注者數19
派生數26
提交數3
已啟用問題?
問題數5
打開的問題數2
拉請求數0
打開的拉請求數3
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?