Skip to content

Commit

Permalink
Use the shopify.rate_limit.cycle value as default request allowance
Browse files Browse the repository at this point in the history
  • Loading branch information
pactode committed Jun 7, 2018
1 parent 6b11137 commit 1aeb9fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/shopify.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'buffer' => 3,

/*
* The request cycle.
* The request cycle / leak rate in percentage per second.
*/
'cycle' => 0.5,

Expand Down
2 changes: 1 addition & 1 deletion src/Providers/DefaultRateLimitProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getRequestTime(RequestInterface $request)
*/
public function getRequestAllowance(RequestInterface $request)
{
return Cache::get($this->prefix . 'request_allowance', 0.5);
return Cache::get($this->prefix . 'request_allowance', config('shopify.rate_limit.cycle'));
}

/**
Expand Down

0 comments on commit 1aeb9fa

Please sign in to comment.