Update retry.md

This commit is contained in:
outlaws 2019-12-27 10:14:38 +08:00 committed by GitHub
parent f428df09fa
commit 3b8f741935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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){