Skip to content

Commit 249ada1

Browse files
vdberghppigazzini
authored andcommitted
Remove the rate limit check in is_master
It is already performed deeper in the call chain.
1 parent 3672b23 commit 249ada1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

server/fishtest/github_api.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ def _is_master(sha, official_master_sha):
126126

127127
def is_master(sha):
128128
try:
129-
# Non sha arguments cannot be safely cached
130-
validate(sha_schema, sha)
131-
# Protect against DOS'ing
132-
rate_limit_ = rate_limit()
133-
if rate_limit_["used"] > rate_limit_["remaining"]:
134-
raise Exception(r"Rate limit more than 50% consumed.")
135129
return _is_master(sha, _official_master_sha)
136130
except Exception as e:
137131
print(f"Unable to evaluate is_master({sha}): {str(e)}", flush=True)

0 commit comments

Comments
 (0)