|
@@ -43,7 +43,7 @@ discard block |
|
|
block discarded – undo |
|
43
|
43
|
/** |
|
44
|
44
|
* @inheritDoc |
|
45
|
45
|
*/ |
|
46
|
|
- public function request(string $method, string $url, array $options = []): ResponseInterface |
|
|
46
|
+ public function request(string $method, string $url, array $options = [ ]): ResponseInterface |
|
47
|
47
|
{ |
|
48
|
48
|
if (!$this->throttleStrategy->shouldThrottle($method, $url, $options)) { |
|
49
|
49
|
return $this->decorated->request($method, $url, $options); |
|
@@ -73,7 +73,7 @@ discard block |
|
|
block discarded – undo |
|
73
|
73
|
private function waitUntilReady(string $method, string $url): void |
|
74
|
74
|
{ |
|
75
|
75
|
$remainingSeconds = $this->throttleStorage->getRemainingTime(); |
|
76
|
|
- $this->logger->info(\sprintf('Max requests / window reached. Waiting %s seconds...', $remainingSeconds), ['method' => $method, 'url' => $url]); |
|
|
76
|
+ $this->logger->info(\sprintf('Max requests / window reached. Waiting %s seconds...', $remainingSeconds), [ 'method' => $method, 'url' => $url ]); |
|
77
|
77
|
|
|
78
|
78
|
if (0 === ($remainingSeconds <=> (int) $remainingSeconds)) { |
|
79
|
79
|
\sleep((int) $remainingSeconds); |
Please login to merge, or discard this patch.