diff --git a/discogs_alert/alert/pushbullet.py b/discogs_alert/alert/pushbullet.py index 507460d..a2163b8 100644 --- a/discogs_alert/alert/pushbullet.py +++ b/discogs_alert/alert/pushbullet.py @@ -20,6 +20,7 @@ def get_all_alerts(self) -> AlertDict: resp = requests.get(url, headers=headers) rate_limit_remaining = int(resp.headers.get("X-Ratelimit-Remaining")) while rate_limit_remaining < 2: + logger.info("About to hit pushbullet's rate limit, waiting 60s") time.sleep(60) resp = requests.get(url, headers=headers) rate_limit_remaining = int(resp.headers.get("X-Ratelimit-Remaining")) @@ -29,6 +30,7 @@ def get_all_alerts(self) -> AlertDict: cursor = None while cursor is not None: if rate_limit_remaining < 2: + logger.info("About to hit pushbullet's rate limit, waiting 60s") time.sleep(60) resp = requests.get(url + f"&cursor={cursor}", headers=headers) rate_limit_remaining = int(resp.headers.get("X-Ratelimit-Remaining"))