@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | public function __construct($maxConcurrent = 10, $usleep = 100000, $userAgent = 'cvweiss/guzzler/', $curlOptions = []) |
| 16 | 16 | { |
| 17 | - $curlOptions = $curlOptions == [] ? [CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_FRESH_CONNECT => false] : $curlOptions; |
|
| 17 | + $curlOptions = $curlOptions == [] ? [CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_FRESH_CONNECT => false] : $curlOptions; |
|
| 18 | 18 | |
| 19 | 19 | $this->curl = new \GuzzleHttp\Handler\CurlMultiHandler(); |
| 20 | 20 | $this->handler = \GuzzleHttp\HandlerStack::create($this->curl); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $ms = microtime(); |
| 34 | 34 | do { |
| 35 | 35 | $this->curl->tick(); |
| 36 | - if ($this->concurrent >= $this->maxConcurrent) usleep(max(1, min(1000000, $this->usleep))); |
|
| 36 | + if ($this->concurrent >= $this->maxConcurrent) usleep(max(1, min(1000000, $this->usleep))); |
|
| 37 | 37 | } while ($this->concurrent >= $this->maxConcurrent); |
| 38 | 38 | return max(0, microtime() - $ms); |
| 39 | 39 | } |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | $this->verifyCallable($fulfilled); |
| 61 | 61 | $this->verifyCallable($rejected); |
| 62 | 62 | |
| 63 | - $params['uri'] = $uri; |
|
| 64 | - $params['fulfilled'] = $fulfilled; |
|
| 65 | - $params['rejected'] = $rejected; |
|
| 66 | - $params['setup'] = $setup; |
|
| 67 | - $params['callType'] = $callType; |
|
| 68 | - $params['body'] = $body; |
|
| 63 | + $params['uri'] = $uri; |
|
| 64 | + $params['fulfilled'] = $fulfilled; |
|
| 65 | + $params['rejected'] = $rejected; |
|
| 66 | + $params['setup'] = $setup; |
|
| 67 | + $params['callType'] = $callType; |
|
| 68 | + $params['body'] = $body; |
|
| 69 | 69 | |
| 70 | 70 | $redis = isset($setup['etag']) ? $setup['etag'] : null; |
| 71 | 71 | if ($redis !== null && $params['callType'] == 'GET') { |