We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e7b236 commit cf854f3Copy full SHA for cf854f3
ally/RateLimit.py
@@ -116,7 +116,8 @@ def wait_until_ally_time(req_type):
116
a_time = now + timedelta(seconds=60.5)
117
118
# Block thread
119
- time.sleep((a_time - now).total_seconds())
+ diff = min(1,a_time - now)
120
+ time.sleep(diff.total_seconds())
121
122
123
def check(req_type: RequestType, block: bool):
@@ -139,7 +140,7 @@ def check(req_type: RequestType, block: bool):
139
140
if block:
141
wait_until_ally_time(req_type)
142
else:
- raise RateLimitException("Too many attemps.")
143
+ raise RateLimitException("Too many attempts.")
144
145
146
def normal_update(headers_dict, req_type):
0 commit comments