Closed bboe closed 11 years ago
I experience a number of dropped messages when I delete large playlists from my bot. By ratelimiting the api a bit (10 rps is still pretty fast) I manged to stop dropping messages.
All messages will still be received, though won't be handled until the bot wakes up. The bot sleeps at most 0.1 second so it shouldn't be an issue.
If you prefer, I can make the ratelimit configurable such that when it's zero there is no rate limiting.
Ho, this is a limitation on the turntable.fm side. They limit the number of requests that a user can make on a lapse of time. I don't think we should enforce the bot to behave like this. (the configurable rate limit may be a good alternative.)
Added configurable rate limit (in constructor) and actually bumped the version.
Awesome :)
I don't get the purpose of this ? I mean, why is it bad to send more then 10 requests by second ? What happend when there is an heartbeat comming in during the sleep time ?