Fix typo succesful -> successful.
This commit is contained in:
parent
e5b07cd72d
commit
1d0f96a966
1 changed files with 4 additions and 4 deletions
|
@ -51,16 +51,16 @@ class Ratelimiter:
|
||||||
|
|
||||||
if self.balance >= cost:
|
if self.balance >= cost:
|
||||||
self.balance -= cost
|
self.balance -= cost
|
||||||
succesful = True
|
successful = True
|
||||||
else:
|
else:
|
||||||
if self.mode == 'reject':
|
if self.mode == 'reject':
|
||||||
succesful = False
|
successful = False
|
||||||
else:
|
else:
|
||||||
deficit = cost - self.balance
|
deficit = cost - self.balance
|
||||||
time_needed = deficit / self.gain_rate
|
time_needed = deficit / self.gain_rate
|
||||||
time.sleep(time_needed)
|
time.sleep(time_needed)
|
||||||
self.balance = 0
|
self.balance = 0
|
||||||
succesful = True
|
successful = True
|
||||||
|
|
||||||
self.last_operation = time.time()
|
self.last_operation = time.time()
|
||||||
return succesful
|
return successful
|
||||||
|
|
Loading…
Reference in a new issue