mirror of
https://git.juggalol.com/agatha/gitmon.git
synced 2024-12-26 23:56:39 +00:00
Remove HTTP 304 checks
This commit is contained in:
parent
5a4960a087
commit
74288909ba
@ -33,7 +33,7 @@ class GitHubApi:
|
||||
"""GET an HTTP resource and return JSON."""
|
||||
url = self.base_url + endpoint
|
||||
|
||||
# Check rate limits
|
||||
# Check rate limits and sleep if exceeded
|
||||
if self.rate_remaining == 0 and self.rate_reset > datetime.now():
|
||||
logger.warning(f'Out of API calls. Sleeping until {self.rate_reset}.')
|
||||
delta = self.rate_reset - datetime.now()
|
||||
@ -45,10 +45,6 @@ class GitHubApi:
|
||||
logger.warning(f'Failed to execute GET request: {str(e)}')
|
||||
return None
|
||||
|
||||
# 304 Not Modified
|
||||
if response.status_code == '304':
|
||||
return None
|
||||
|
||||
self.__parse_headers(response.headers)
|
||||
return response.json()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user