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:
Simon Westphahl 2020-07-01 11:40:50 +02:00
parent 041e251b7c
commit 05d3eddd49
1 changed files with 1 additions and 1 deletions

View File

@ -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)