mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-01 03:08:06 +08:00
Update retry.md
This commit is contained in:
parent
f428df09fa
commit
3b8f741935
@ -332,7 +332,7 @@ $result = \Hyperf\Retry\Retry::with(
|
||||
$result = \Hyperf\Retry\Retry::whenReturns(false) // 当返回false时重试
|
||||
->max(3) // 最多3次
|
||||
->inSeconds(5) // 最长5秒
|
||||
->sleep(1) // 间隔1秒
|
||||
->sleep(1) // 间隔1毫秒
|
||||
->fallback(function(){return true;}) // fallback函数
|
||||
->call(function(){
|
||||
if (rand(1, 100) >= 20){
|
||||
|
Loading…
Reference in New Issue
Block a user