wf run task 优化
This commit is contained in:
parent
839e11b575
commit
0981700f30
|
@ -181,7 +181,7 @@ class HrmService:
|
|||
}
|
||||
is_ok, res = dhClient.request(**dhapis['card_door_authority'], json=json_data, raise_exception=False)
|
||||
if is_ok == 'fail' and '44999999' in res['code']:
|
||||
time.sleep(10)
|
||||
time.sleep(14)
|
||||
dhClient.request(**dhapis['card_door_authority'], json=json_data)
|
||||
elif is_ok == 'fail':
|
||||
raise ParseError(**res)
|
||||
|
|
|
@ -48,8 +48,9 @@ def run_task(ticket_id: str, retry_num=1):
|
|||
except Exception:
|
||||
retry_num_new = retry_num - 1
|
||||
if retry_num_new >= 0:
|
||||
time.sleep(10)
|
||||
run_task(ticket_id, retry_num_new)
|
||||
time.sleep(5)
|
||||
run_task.delay(ticket_id, retry_num_new)
|
||||
return
|
||||
err_detail = traceback.format_exc()
|
||||
myLogger.error('工作流脚本执行失败', exc_info=True)
|
||||
script_result = False
|
||||
|
|
Loading…
Reference in New Issue