iScsc / RootPythia

A Root-Me discord bot to notify on new solves, display charts...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rewrite the RateLimiter class to better handle exceptions and move dependant code to relevant API Manager

ctmbl opened this issue · comments

#19 was just trying to fix a unique bug but trying to update the whole class turned into a much bigger work that needs its own PR
it should address the last two issues I arised in my last review of #19

but this task loop is really growing... don't you think we should start splitting it into several functions?

also I don't really want to deal with this now but I'll say it anyway:
this status code handling is very RootMe dependant, maybe we should move some code to the RootMeApi class else what is the point of thsi class?
In particular if RateLimiter is planned to be used by another Api class (say HTB API for example) it will badly deal with 429.
It could also solve my first point by moving some code outside this big while loop