修改 dahua xunxi 登录的timeout为10

This commit is contained in:
caoqianming 2023-03-12 09:35:59 +08:00
parent cf26cc69a8
commit c12f057790
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class DhClient:
'client_id': self.client_id, 'client_id': self.client_id,
'client_secret': self.client_secret 'client_secret': self.client_secret
} }
is_ok, res = self.request(**dhapis['token_login'], params=params, raise_exception=False, timeout=2) is_ok, res = self.request(**dhapis['token_login'], params=params, raise_exception=False, timeout=10)
if is_ok == 'success': if is_ok == 'success':
cache.set('dh_token', res['access_token'], timeout=None) cache.set('dh_token', res['access_token'], timeout=None)
self.isGetingToken = False self.isGetingToken = False

View File

@ -39,7 +39,7 @@ class XxClient:
json = { json = {
'licence': self.licence 'licence': self.licence
} }
is_ok, res = self.request(**xxapis['token_login'], json=json, raise_exception=False, timeout=2) is_ok, res = self.request(**xxapis['token_login'], json=json, raise_exception=False, timeout=10)
if is_ok == 'success': if is_ok == 'success':
cache.set('xx_token', res['token'], timeout=None) cache.set('xx_token', res['token'], timeout=None)
self.isGetingToken = False self.isGetingToken = False