From c12f0577903ae9df9b6220298b210f72d444ed30 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 12 Mar 2023 09:35:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20dahua=20xunxi=20=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=9A=84timeout=E4=B8=BA10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/third/dahua.py | 2 +- apps/third/xunxi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/third/dahua.py b/apps/third/dahua.py index 6f4a0ab1..9b027b27 100644 --- a/apps/third/dahua.py +++ b/apps/third/dahua.py @@ -46,7 +46,7 @@ class DhClient: 'client_id': self.client_id, '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': cache.set('dh_token', res['access_token'], timeout=None) self.isGetingToken = False diff --git a/apps/third/xunxi.py b/apps/third/xunxi.py index a71d7419..678c4716 100644 --- a/apps/third/xunxi.py +++ b/apps/third/xunxi.py @@ -39,7 +39,7 @@ class XxClient: json = { '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': cache.set('xx_token', res['token'], timeout=None) self.isGetingToken = False