diff --git a/lib/CurlRequest.php b/lib/CurlRequest.php index 4cb335f..44e183b 100644 --- a/lib/CurlRequest.php +++ b/lib/CurlRequest.php @@ -152,7 +152,7 @@ protected static function processRequest($ch, $url) }, function () { - usleep(250000); + throw new Exception\ThrottleException("Could not get lock on API resource in Redis."); }); if (isset($output)) { diff --git a/lib/Exception/ThrottleException.php b/lib/Exception/ThrottleException.php new file mode 100644 index 0000000..e16900a --- /dev/null +++ b/lib/Exception/ThrottleException.php @@ -0,0 +1,7 @@ +