Skip to content

Commit

Permalink
fix: Update token refresh threshold from 20 seconds to 5 minutes (#1146)
Browse files Browse the repository at this point in the history
* fix: Update token refresh threshold from 20 seconds to 5 minutes

* update rt
  • Loading branch information
sai-sunder-s committed Sep 20, 2022
1 parent 08b29e2 commit 261a561
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions google/auth/_helpers.py
Expand Up @@ -23,11 +23,7 @@
from six.moves import urllib


# Token server doesn't provide a new a token when doing refresh unless the
# token is expiring within 30 seconds, so refresh threshold should not be
# more than 30 seconds. Otherwise auth lib will send tons of refresh requests
# until 30 seconds before the expiration, and cause a spike of CPU usage.
REFRESH_THRESHOLD = datetime.timedelta(seconds=20)
REFRESH_THRESHOLD = datetime.timedelta(seconds=300)


def copy_docstring(source_class):
Expand Down
Binary file modified system_tests/secrets.tar.enc
Binary file not shown.

0 comments on commit 261a561

Please sign in to comment.