934c745d by 冯轩

MOD:fsm 延迟比对可配置

1 parent 5809b3db
...@@ -3709,15 +3709,16 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, ...@@ -3709,15 +3709,16 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id,
3709 is_ca, is_cms)) 3709 is_ca, is_cms))
3710 3710
3711 # 实时查询延迟时间 3711 # 实时查询延迟时间
3712 delay_time = Configs.objects.filter(id=4).first() 3712 delay_time_config = Configs.objects.filter(id=4).first()
3713 if delay_time is None or not delay_time.isdigit(): 3713 delay_time = delay_time_config.value
3714 if delay_time_config is None or delay_time is None or not delay_time.isdigit():
3714 delay_time = 0 3715 delay_time = 0
3715 compare_log.info('delay_time:',delay_time) 3716 compare_log.info('delay_time:{0}'.format(delay_time))
3716 3717
3717 # 查看此订单号下是否有未完成的文件,如果有,等1分钟 3718 # 查看此订单号下是否有未完成的文件,如果有,等1分钟
3718 doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc 3719 doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc
3719 doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() 3720 doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first()
3720 compare_log.info('doc_wait_file_result:',doc_wait_file_result) 3721 compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result))
3721 compare_log.info('{0} [comparison unfinished file check] [entity={1}] [id={2}] [doc_wait_file_result={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result)) 3722 compare_log.info('{0} [comparison unfinished file check] [entity={1}] [id={2}] [doc_wait_file_result={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result))
3722 if doc_wait_file_result is not None: 3723 if doc_wait_file_result is not None:
3723 compare_log.info('{0} [comparison unfinished file wait delay_time start] [entity={1}] [id={2}] [doc_id={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result.id)) 3724 compare_log.info('{0} [comparison unfinished file wait delay_time start] [entity={1}] [id={2}] [doc_id={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result.id))
...@@ -3768,14 +3769,16 @@ def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ ...@@ -3768,14 +3769,16 @@ def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_
3768 '[is_cms={6}]'.format(log_base, application_entity, application_id, uniq_seq, ocr_res_id, 3769 '[is_cms={6}]'.format(log_base, application_entity, application_id, uniq_seq, ocr_res_id,
3769 is_ca, is_cms)) 3770 is_ca, is_cms))
3770 # 实时查询延迟时间 3771 # 实时查询延迟时间
3771 delay_time = Configs.objects.filter(id=4).first() 3772 delay_time_config = Configs.objects.filter(id=4).first()
3772 if delay_time is None or not delay_time.isdigit(): 3773 delay_time = delay_time_config.value
3774 if delay_time_config is None or delay_time is None or not delay_time.isdigit():
3773 delay_time = 0 3775 delay_time = 0
3774 compare_log.info('delay_time:',delay_time) 3776 compare_log.info('delay_time:{0}'.format(delay_time))
3777
3775 # 查看此订单号下是否有未完成的文件,如果有,等1分钟 3778 # 查看此订单号下是否有未完成的文件,如果有,等1分钟
3776 doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc 3779 doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc
3777 doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() 3780 doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first()
3778 compare_log.info('doc_wait_file_result:',doc_wait_file_result) 3781 compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result))
3779 compare_log.info('{0} [comparison unfinished file check] [entity={1}] [id={2}] [doc_wait_file_result={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result)) 3782 compare_log.info('{0} [comparison unfinished file check] [entity={1}] [id={2}] [doc_wait_file_result={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result))
3780 if doc_wait_file_result is not None: 3783 if doc_wait_file_result is not None:
3781 compare_log.info('{0} [comparison unfinished file wait delay_time start] [entity={1}] [id={2}] [doc_id={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result.id)) 3784 compare_log.info('{0} [comparison unfinished file wait delay_time start] [entity={1}] [id={2}] [doc_id={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result.id))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!