Increase LDAP API timeout

This commit is contained in:
Tanner Collin 2021-05-29 03:27:39 +00:00
parent b725acb2d1
commit 7dabdc4809

View File

@ -14,7 +14,7 @@ def ldap_api(route, data):
try: try:
headers = {'Authorization': 'Token ' + secrets.LDAP_API_KEY} headers = {'Authorization': 'Token ' + secrets.LDAP_API_KEY}
url = secrets.LDAP_API_URL + route url = secrets.LDAP_API_URL + route
r = requests.post(url, data=data, headers=headers, timeout=5) r = requests.post(url, data=data, headers=headers, timeout=10)
return r.status_code return r.status_code
except BaseException as e: except BaseException as e:
logger.error('LDAP {} - {} - {}'.format(url, e.__class__.__name__, str(e))) logger.error('LDAP {} - {} - {}'.format(url, e.__class__.__name__, str(e)))