From 76f1ceb554c0dceb226cf0ac23c79ff9383db08e Mon Sep 17 00:00:00 2001 From: Normal Human Date: Mon, 7 Dec 2015 09:24:31 -0500 Subject: [PATCH] be sure it really rolled over --- bodyfetcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bodyfetcher.py b/bodyfetcher.py index 5f16ed72c2..6e3c03b2dd 100644 --- a/bodyfetcher.py +++ b/bodyfetcher.py @@ -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: