Expire Github installation key 3 minutes before
With the previous safety margin of 2min we were still seeing token expire exceptions from time to time. Change-Id: I6d20b63d989e4eabbe8fad9846fb80a8e036eea1
This commit is contained in:
parent
041e251b7c
commit
05d3eddd49
|
@ -1006,7 +1006,7 @@ class GithubConnection(BaseConnection):
|
|||
data = response.json()
|
||||
|
||||
expiry = iso8601.parse_date(data['expires_at'])
|
||||
expiry -= datetime.timedelta(minutes=2)
|
||||
expiry -= datetime.timedelta(minutes=3)
|
||||
token = data['token']
|
||||
|
||||
self.installation_token_cache[installation_id] = (token, expiry)
|
||||
|
|
Loading…
Reference in New Issue