mirror of
https://git.juggalol.com/agatha/gitmon.git
synced 2024-12-26 23:56:39 +00:00
Add countdown
This commit is contained in:
parent
a15b5ffda0
commit
5c4fb60ff2
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user