Comments (7)
There's no specific retrying in the library, but it would be pretty trivial to implement a helper that can offer exponential backoff to save people have to do it themselves. I'll take a look at it when I get a chance.
from google-api-php-client.
Closing because there hasn't been any activity on this issue.
from google-api-php-client.
π
This would be very helpful.
from google-api-php-client.
Here is something from the Java implementation taken from ExponentialBackOff.java, in case it might help:
/**
* Implementation of {@link BackOff} that increases the back off period for each retry attempt using
* a randomization function that grows exponentially.
*
* <p>
* {@link #nextBackOffMillis()} is calculated using the following formula:
* </p>
*
* <pre>
randomized_interval =
retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor])
* </pre>
*
* <p>
* In other words {@link #nextBackOffMillis()} will range between the randomization factor
* percentage below and above the retry interval. For example, using 2 seconds as the base retry
* interval and 0.5 as the randomization factor, the actual back off period used in the next retry
* attempt will be between 1 and 3 seconds.
* </p>
*
* <p>
* <b>Note:</b> max_interval caps the retry_interval and not the randomized_interval.
* </p>
*
* <p>
* If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the
* max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning
* {@link BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}.
* </p>
*
* <p>
* Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default
* multiplier is 1.5 and the default max_interval is 1 minute. For 10 tries the sequence will be
* (values in seconds) and assuming we go over the max_elapsed_time on the 10th try:
* </p>
*
* <pre>
request# retry_interval randomized_interval
1 0.5 [0.25, 0.75]
2 0.75 [0.375, 1.125]
3 1.125 [0.562, 1.687]
4 1.687 [0.8435, 2.53]
5 2.53 [1.265, 3.795]
6 3.795 [1.897, 5.692]
7 5.692 [2.846, 8.538]
8 8.538 [4.269, 12.807]
9 12.807 [6.403, 19.210]
10 19.210 {@link BackOffPolicy#STOP}
* </pre>
*
* <p>
* Implementation is not thread-safe.
* </p>
*
* @since 1.15
* @author Ravi Mistry
*/
Hope it helps,
Paul
from google-api-php-client.
Please re-open this issue.
from google-api-php-client.
@glen-84 the latest version of this library uses Guzzle5, and may work well with this plugin
from google-api-php-client.
Okay, thanks.
from google-api-php-client.
Related Issues (20)
- What is redirect url HOT 1
- Status run HOT 2
- Problem retrieving domain user list HOT 1
- Feat. request: timeout for default http client
- Uncaught Error: Class 'Google_Service_Customsearch' HOT 2
- insert product using google-api-php-client HOT 1
- Changing OAuth scope giving invalid credentials error for existing users when appending rows in google sheet.
- PAGINATION - Next page token is always null ? HOT 1
- Issue with Namespacing Google Libraries in WordPress Plugin HOT 2
- Issue with Namespacing Google Libraries in WordPress Plugin HOT 1
- [reasonPhrase:GuzzleHttp\Psr7\Response:private] => Forbidden HOT 3
- Dependency phpseclib/phpseclib has a security update HOT 1
- Support for "forHandle" parameter in youtube->channels->list request HOT 3
- https://oauth2.googleapis.com/token curl: (28) Failed to connect to oauth2.googleapis.com port 443 after 227030 ms: Couldn't connect to server HOT 1
- Extending Google Analytics APIs: Best Practices and Customization Techniques HOT 1
- How to set "enable_granular_consent" parameter on Client.php? HOT 4
- Hey, Iβve been working with Swoole and I think thereβs an issue when the application runs in a resident memory environment HOT 1
- Oath without json file HOT 1
- Uncaught TypeError: Argument must be an instance of RenderAccountIssuesRequestPayload HOT 1
- Custom Namespace issue on google analytics-admin and analytics-data php api. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-api-php-client.