From 4e6f4b249bf29da8ab653f90aa5a3b6f33a06749 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 9 May 2023 17:02:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20while=20=E5=BE=AA=E7=8E=AF=E5=81=9Acard?= =?UTF-8?q?=5Fdoor=5Fauthority=E7=9A=84=E6=8F=90=E9=AB=98=E8=A1=A5?= =?UTF-8?q?=E5=81=BF=E6=9C=BA=E5=88=B6=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/hrm/services.py b/apps/hrm/services.py index 9faaf32d..6dc4c9cf 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -193,14 +193,14 @@ class HrmService: "cardPrivilegeDetails": details } ind = 0 - while ind < 6: + while ind < 8: time.sleep(6) try: dhClient.request(**dhapis['card_door_authority'], json=json_data) break except Exception as e: ind = ind + 1 - if ind >= 6: + if ind >= 8: raise e # time.sleep(5) # is_ok, res = dhClient.request(**dhapis['card_door_authority'], json=json_data, raise_exception=False)