chore(php) #57 : bump PHP version to 8.4
This commit is contained in:
@ -8,8 +8,8 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
|
||||
|
||||
class Client
|
||||
{
|
||||
private const MAX_RETRY = 3;
|
||||
private const SLEEP_TIME = [
|
||||
private const int MAX_RETRY = 3;
|
||||
private const array SLEEP_TIME = [
|
||||
5,
|
||||
500,
|
||||
5000,
|
||||
@ -78,7 +78,7 @@ class Client
|
||||
$status = $response->getStatusCode();
|
||||
if (503 === $status) {
|
||||
++$attempt;
|
||||
usleep(1000 * self::SLEEP_TIME[$attempt] + rand(1, 5) * 1000);
|
||||
usleep(1000 * self::SLEEP_TIME[$attempt] + random_int(1, 5) * 1000);
|
||||
continue;
|
||||
}
|
||||
switch ($status) {
|
||||
|
Reference in New Issue
Block a user