brightcove / PHP-API-Wrapper

This project provides a starting point for integrating the Brightcove CMS API into your application. It provides simple ways to interact with the API, as well as a long list of helper functions.
25 stars 33 forks source link

Add a protection against the built in rate limit #22

Closed dawehner closed 7 years ago

dawehner commented 7 years ago

Brightcove has a rate limititation. On normal usage this is not triggered, but we hit it as part of our migration.

This PR tries to protect against that by resending the request, when we receive a 429 error.

tamasd commented 7 years ago

Can you add some kind of limit? I don't like when a loop like this can run infinitely, blocking server threads.

dawehner commented 7 years ago

What about something like 20?

dawehner commented 7 years ago

I went with 10 now

tamasd commented 7 years ago

Thanks for the contribution!

dawehner commented 7 years ago

Thank you for the quick feedback