ricbra / php-discogs-api

PHP 5.4 Implementation of the Discogs API
MIT License
152 stars 96 forks source link

wait a lil' bit more between two calls #14

Closed iamdey closed 10 years ago

iamdey commented 10 years ago

quick fix, I had lot of failed connections. Seems to be better like that.

ricbra commented 10 years ago

Thanks!

iamdey commented 10 years ago

With the fresh new version 1.0, it seems you have removed the throttle feature.

We (developers) need to write our own throttle or do I missed something?

ricbra commented 10 years ago

Hi @esion

For now it's removed indeed. Would you mind to open a new issue so this feature doesn't get lost in an old closed ticket?

It would be nice to add some plugins to this library for throttling and stuff like that. Throttling could be easily implemented using the event system and a event subscriber (http://guzzle.readthedocs.org/en/latest/events.html). For inspiration you could take a look at the available subscribers, for example: https://github.com/guzzle/log-subscriber

If you would like to contribute such plugin you're more then welcome :smiley:

ricbra commented 10 years ago

@esion I added a ThrottleSubscriber, please see 1.0.2

iamdey commented 10 years ago

cool, I'll check that during the month.

David Epely Enthousiastic coder https://twitter.com/esion

2014-08-06 19:44 GMT+02:00 Richard van den Brand notifications@github.com:

@esion https://github.com/esion I added a ThrottleSubscriber, please see 1.0.2

— Reply to this email directly or view it on GitHub https://github.com/ricbra/php-discogs-api/pull/14#issuecomment-51370217.