没有合适的资源?快使用搜索试试~ 我知道了~
executioner:用于处理 PHP 异常和重试代码执行的库
共23个文件
php:17个
md:1个
lock:1个
需积分: 9 0 下载量 114 浏览量
2021-07-01
18:36:10
上传
评论
收藏 20KB ZIP 举报
温馨提示
刽子手 该库旨在创建一种简单的方法来执行可能引发异常并应重新尝试的代码。 安装 运行composer require tebru/executioner:dev-master 基本用法 该库可以像这样简单地使用 <?php use Tebru\Executioner; $executor = new Executor(); $result = $executor->execute(2, function () { /* code that may throw an exception */ }); 这将在所有异常上重试两次。 不抛出异常而执行失败将导致抛出\Tebru\Executioner\Exception\FailedException 。 如果您不希望该异常传播,请确保将您的execute()调用包装在 try/catch 中。 活动 事件用于提供对操作的钩子/洞察力。 这4个事
资源推荐
资源详情
资源评论
收起资源包目录
executioner-master.zip (23个子文件)
executioner-master
composer.json 734B
.travis.yml 64B
phpunit.xml 202B
composer.lock 35KB
tests
ExecutorTest.php 3KB
src
Executor.php 8KB
Subscriber
LoggerSubscriber.php 3KB
ReturnSubscriber.php 2KB
WaitSubscriber.php 2KB
Factory
ExecutorFactory.php 2KB
Event
BeforeAttemptEvent.php 243B
ExecutionEvent.php 859B
AfterAttemptEvent.php 960B
EndAttemptEvent.php 923B
FailedAttemptEvent.php 889B
Strategy
WaitStrategy.php 420B
ExponentialBackoffStrategy.php 1KB
StaticWaitStrategy.php 676B
Exception
InvalidArgumentException.php 248B
ReturnException.php 307B
FailedException.php 265B
.gitignore 15B
README.md 3KB
共 23 条
- 1
资源评论
thonxie
- 粉丝: 23
- 资源: 4532
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功