took CAPIAuthorizer.refresh_by_state's failure_tolerance argument to config

This commit is contained in:
norohind 2023-12-11 21:25:52 +03:00
parent 33d776cd70
commit 87ca270395
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ class CAPIAuthorizer:
return row
def refresh_by_state(self, state: str, force_refresh=False, failure_tolerance=True) -> dict:
def refresh_by_state(self, state: str, force_refresh=False, failure_tolerance=config.default_failure_tolerance) -> dict:
"""
:param state:

View File

@ -11,7 +11,7 @@ log_level = os.getenv('LOG_LEVEL', 'DEBUG').upper()
access_key = os.getenv('access_key')
db_location = os.getenv('db_location', 'companion-api.sqlite')
default_failure_tolerance = os.getenv('default_failure_tolerance', 'True').lower() == 'true'
REDIRECT_URL = requests.utils.quote(os.getenv('REDIRECT_URL', ''))
AUTH_URL = 'https://auth.frontierstore.net/auth'
TOKEN_URL = 'https://auth.frontierstore.net/token'