修改 dahua xunxi 登录的timeout为10
This commit is contained in:
parent
cf26cc69a8
commit
c12f057790
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue