I am consuming a webservice in a node project.
The webservice has restricitions - i can make maximum 10 requests per minute.
I can write functions which make the right requests, get data back etc.
Request #1 - give me Persons (this returns an array of 1000 people) Request #2 - Give me each persons excercise list for the last week (I have to make a request for 24 hours at a time (7 requests per person) (I need to make 1000 requests, but keep it to a maximum of 10 requests per minute) -
I have attemptet setTimeout, event listeners etc, but no matter what, my code rushes to the end - giving me the right data for the first few people before I am getting "too many requests" back from the server...
Can anybody suggest the correct approach ?
via Morten
No comments:
Post a Comment