diff --git a/apps/hrm/services.py b/apps/hrm/services.py index fe221af9..88aa565b 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -1,3 +1,4 @@ +import time from apps.hrm.models import ClockRecord, Employee from apps.third.models import TDevice from apps.third.tapis import dhapis @@ -121,6 +122,7 @@ class HrmService: "endDate": endDate, "departmentId": departmentId, } + time.sleep(1) _, res = dhClient.request(**dhapis['card_update'], json=json_data) return cardNumber else: @@ -145,6 +147,7 @@ class HrmService: "startDate": startDate, "endDate": endDate } + time.sleep(1) _, res = dhClient.request(**dhapis['card_add'], json=json_data) cls.save(ep, data={'dh_face_card': cardNumber}) return cardNumber