Skip to content

Commit

Permalink
be sure it really rolled over
Browse files Browse the repository at this point in the history
  • Loading branch information
normalhuman committed Dec 7, 2015
1 parent b6a9ff3 commit 76f1ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bodyfetcher.py
Expand Up @@ -75,7 +75,7 @@ def make_api_call_for_site(self, site):
return # could add some retrying logic here, but eh.

if "quota_remaining" in response:
if response["quota_remaining"] > GlobalVars.apiquota and GlobalVars.apiquota >= 0:
if response["quota_remaining"] - GlobalVars.apiquota >= 1000 and GlobalVars.apiquota >= 0:
GlobalVars.charcoal_hq.send_message("API quota rolled over with {} requests remaining.".format(GlobalVars.apiquota))
GlobalVars.apiquota = response["quota_remaining"]
else:
Expand Down

0 comments on commit 76f1ceb

Please sign in to comment.