From 5c4fb60ff226e6f2c46ab0ae39f0d5bd7e901cd0 Mon Sep 17 00:00:00 2001 From: agatha Date: Fri, 10 Nov 2023 22:46:18 -0500 Subject: [PATCH] Add countdown --- gitmon/api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gitmon/api.py b/gitmon/api.py index eb52918..29fe759 100644 --- a/gitmon/api.py +++ b/gitmon/api.py @@ -56,8 +56,7 @@ class GitHubApi: """Parse headers to update rate limits.""" self.rate_reset = datetime.fromtimestamp(int(headers['x-ratelimit-reset'])) self.rate_remaining = int(headers['x-ratelimit-remaining']) - logger.info(f'{self.rate_remaining} calls remaining until {self.rate_reset}') - + logger.info(f'{self.rate_remaining} calls remaining until {self.rate_reset} ({self.rate_reset - datetime.now()})') def get_events(self, page=None): """Fetch GitHub events."""