commit | 142a92ce8b834a412c16c0451ed8d434ea323e58 | [log] [tgz] |
---|---|---|
author | Andrii Shyshkalov <tandrii@chromium.org> | Fri May 04 12:21:24 2018 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Fri May 04 19:26:56 2018 +0000 |
tree | 6b4ccf1cc9bc2058e95bc5ec4b06c9496d16b42d | |
parent | 15759121361d022b84c2759281e024f94fb2e0d1 [diff] [blame] |
auth: request refresh tokens with expiry <3 minutes. Due to swarming, 5 minutes is hard upper limit, and by the time token arrives to the bot it may be <5 minutes, like here https://logs.chromium.org/v/?s=chromium%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8947432403218547136%2F%2B%2Fsteps%2Fpresubmit%2F0%2Fstdout R=vadimsh@chromium.org Bug: 837087 Change-Id: I98fbe3f0f85c9f62bc984f439614c3f88a16ed06 Reviewed-on: https://chromium-review.googlesource.com/1044779 Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/auth.py b/auth.py index dcda8c3..d3ac16c 100644 --- a/auth.py +++ b/auth.py
@@ -81,8 +81,8 @@ """True if this AccessToken should be refreshed.""" if self.expires_at is not None: now = now or datetime.datetime.utcnow() - # Allow 5 min of clock skew between client and backend. - now += datetime.timedelta(seconds=300) + # Allow 3 min of clock skew between client and backend. + now += datetime.timedelta(seconds=180) return now >= self.expires_at # Token without expiration time never expires. return False