Increase ldap api call timeout

This commit is contained in:
Tanner Collin 2020-11-15 01:47:04 +00:00
parent e8198f7b2a
commit 4bc2965f60

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=3) r = requests.post(url, data=data, headers=headers, timeout=5)
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)))