0.05 is too fast
Closed this issue · 6 comments
It might be something else(maybe one push with one token) because I changed the timer to 0.75 form 0.05 and nothing changed, it gets the same error.
Yeah found the reason, it's just one push per one token.
` token = ""
# Select courses, do it a few times just in case.
Logger.log("Dersler Seçiliyor...")
for _ in range(MAX_TRIES):
new_token = token_fetcher.fetch_token()
if "ERROR" not in new_token:
token = new_token
request_course_selection(token, crn_list)
sleep(DELAY_BETWEEN_TRIES)
`
this solved the problem but it's 4 secs per push which is a large time maybe you can optimize it. I don't have necessary knowledge.
It's not one push per token It's one push per second**
@SchumacherFarad I hit the same API rate limit too. To fix it, I changed it so the code waits until the exact time and starts doing the requests with 1 second between each try in 540a3d2. The code seams to be working more consistently now.
I'd be glad if you could test it and close this issue if it's resolved ^^
I had to reopen this issue due to an announcement posted today. kepler will limit us all to sending a request every 3 seconds so the DELAY_BETWEEN_TRIES at this line
Line 18 in 48b18b6
It should be fixed with the latest commit