Merge branch 'hotfix/2025-02' into feature/uat-tmp
Showing
1 changed file
with
14 additions
and
0 deletions
... | @@ -3775,7 +3775,10 @@ def fsm_compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca= | ... | @@ -3775,7 +3775,10 @@ def fsm_compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca= |
3775 | 3775 | ||
3776 | compare_log.info('[fsm thread]') | 3776 | compare_log.info('[fsm thread]') |
3777 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="fsm_thread_") | 3777 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="fsm_thread_") |
3778 | try: | ||
3778 | pool.submit(fsm_compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) | 3779 | pool.submit(fsm_compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) |
3780 | except Exception as e: | ||
3781 | compare_log.info('[fsm thread fail] [error={0}]'.format(traceback.format_exc())) | ||
3779 | #pool.shutdown(wait=True) | 3782 | #pool.shutdown(wait=True) |
3780 | 3783 | ||
3781 | 3784 | ||
... | @@ -3785,10 +3788,14 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, | ... | @@ -3785,10 +3788,14 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, |
3785 | is_ca, is_cms)) | 3788 | is_ca, is_cms)) |
3786 | 3789 | ||
3787 | # 查看此订单号下是否有未完成的文件,如果有,等1分钟 | 3790 | # 查看此订单号下是否有未完成的文件,如果有,等1分钟 |
3791 | try: | ||
3788 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc | 3792 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc |
3789 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() | 3793 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() |
3790 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) | 3794 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) |
3791 | 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)) | 3795 | 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)) |
3796 | except Exception as e: | ||
3797 | doc_wait_file_result = None | ||
3798 | compare_log.info('[get doc_wait_file_result fail] [error={0}]'.format(traceback.format_exc())) | ||
3792 | if doc_wait_file_result is not None: | 3799 | if doc_wait_file_result is not None: |
3793 | # 实时查询延迟时间 | 3800 | # 实时查询延迟时间 |
3794 | try: | 3801 | try: |
... | @@ -3853,7 +3860,10 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True | ... | @@ -3853,7 +3860,10 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True |
3853 | 3860 | ||
3854 | compare_log.info('[non fsm thread]') | 3861 | compare_log.info('[non fsm thread]') |
3855 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="non_fsm_thread_") | 3862 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="non_fsm_thread_") |
3863 | try: | ||
3856 | pool.submit(compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) | 3864 | pool.submit(compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) |
3865 | except Exception as e: | ||
3866 | compare_log.info('[non fsm thread fail] [error={0}]'.format(traceback.format_exc())) | ||
3857 | #pool.shutdown(wait=True) | 3867 | #pool.shutdown(wait=True) |
3858 | 3868 | ||
3859 | def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True, is_cms=False): | 3869 | def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True, is_cms=False): |
... | @@ -3903,10 +3913,14 @@ def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ | ... | @@ -3903,10 +3913,14 @@ def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ |
3903 | return | 3913 | return |
3904 | 3914 | ||
3905 | # 查看此订单号下是否有未完成的文件,如果有,等?分钟 | 3915 | # 查看此订单号下是否有未完成的文件,如果有,等?分钟 |
3916 | try: | ||
3906 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc | 3917 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc |
3907 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() | 3918 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() |
3908 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) | 3919 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) |
3909 | 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)) | 3920 | 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)) |
3921 | except Exception as e: | ||
3922 | doc_wait_file_result = None | ||
3923 | compare_log.info('[get doc_wait_file_result fail] [error={0}]'.format(traceback.format_exc())) | ||
3910 | if doc_wait_file_result is not None: | 3924 | if doc_wait_file_result is not None: |
3911 | # 实时查询延迟时间 | 3925 | # 实时查询延迟时间 |
3912 | try: | 3926 | try: | ... | ... |
-
Please register or sign in to post a comment