|
|
@ -1,5 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
|
|
import gevent
|
|
|
|
import gevent
|
|
|
|
|
|
|
|
|
|
|
@ -55,7 +56,7 @@ class GoogleAPIClient(object):
|
|
|
|
))
|
|
|
|
))
|
|
|
|
gevent.spawn_later(expires_in - self.ACCESS_TOKEN_REFRESH_TIME_BEFORE_EXPIRY, self.get_access_token)
|
|
|
|
gevent.spawn_later(expires_in - self.ACCESS_TOKEN_REFRESH_TIME_BEFORE_EXPIRY, self.get_access_token)
|
|
|
|
except Exception:
|
|
|
|
except Exception:
|
|
|
|
self.logger.exception("Failed to fetch access token, retrying")
|
|
|
|
logging.exception("Failed to fetch access token, retrying")
|
|
|
|
self.wait(self.ACCESS_TOKEN_ERROR_RETRY_INTERVAL)
|
|
|
|
self.wait(self.ACCESS_TOKEN_ERROR_RETRY_INTERVAL)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
break
|
|
|
|
break
|
|
|
|