Added method to return all matches for a single account#39
Added method to return all matches for a single account#39gregaz wants to merge 1 commit intojoshuaduffy:masterfrom
Conversation
|
Hey, This does seem like a useful piece of functionality and thank you for taking the time to do this. I am not sure that we should be relaying requests when we've already been throttled with a 503. Thoughts? @evaldobratti |
|
The only info I could find from Valve's forum on limits to their API is below: Currently upon receiving a 503, the code will wait a random time between 5 and 60 seconds, then retry the request (this can only happen up to 5 times before it will throw an error). I could change the minimum wait time to be 30 seconds as suggested by valve if you think that would be better. I've also got some 1 second sleeps in there to make sure we aren't making more than one request per second. Open to any other ideas as well. |
|
I realize this PR is a bit stale but retries and sleeps can be handled directly in requests without any additional libraries. |
|
I made my script to exponentially increase sleep time up to some maximum whenever a request fails, and decrease it linearly by a small amount whenever a request succeeds. It turns out that currently I am sending a request every 5.1 seconds on average this way, so a fixed sleep time between 5 and 10 seconds should be safe. |
Let me know if this looks like it would be a useful addition