ADD:log
Showing
1 changed file
with
24 additions
and
10 deletions
... | @@ -3731,7 +3731,10 @@ def fsm_compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca= | ... | @@ -3731,7 +3731,10 @@ def fsm_compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca= |
3731 | 3731 | ||
3732 | compare_log.info('[fsm thread]') | 3732 | compare_log.info('[fsm thread]') |
3733 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="fsm_thread_") | 3733 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="fsm_thread_") |
3734 | pool.submit(fsm_compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) | 3734 | try: |
3735 | pool.submit(fsm_compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) | ||
3736 | except Exception as e: | ||
3737 | compare_log.info('[fsm thread fail] [error={0}]'.format(traceback.format_exc())) | ||
3735 | #pool.shutdown(wait=True) | 3738 | #pool.shutdown(wait=True) |
3736 | 3739 | ||
3737 | 3740 | ||
... | @@ -3741,10 +3744,14 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, | ... | @@ -3741,10 +3744,14 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, |
3741 | is_ca, is_cms)) | 3744 | is_ca, is_cms)) |
3742 | 3745 | ||
3743 | # 查看此订单号下是否有未完成的文件,如果有,等1分钟 | 3746 | # 查看此订单号下是否有未完成的文件,如果有,等1分钟 |
3744 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc | 3747 | try: |
3745 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() | 3748 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc |
3746 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) | 3749 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() |
3747 | 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)) | 3750 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) |
3751 | 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)) | ||
3752 | except Exception as e: | ||
3753 | doc_wait_file_result = None | ||
3754 | compare_log.info('[get doc_wait_file_result fail] [error={0}]'.format(traceback.format_exc())) | ||
3748 | if doc_wait_file_result is not None: | 3755 | if doc_wait_file_result is not None: |
3749 | # 实时查询延迟时间 | 3756 | # 实时查询延迟时间 |
3750 | try: | 3757 | try: |
... | @@ -3809,7 +3816,10 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True | ... | @@ -3809,7 +3816,10 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True |
3809 | 3816 | ||
3810 | compare_log.info('[non fsm thread]') | 3817 | compare_log.info('[non fsm thread]') |
3811 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="non_fsm_thread_") | 3818 | #pool = ThreadPoolExecutor(max_workers=6, thread_name_prefix="non_fsm_thread_") |
3812 | pool.submit(compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) | 3819 | try: |
3820 | pool.submit(compare_thread, application_id, application_entity, uniq_seq, ocr_res_id, is_ca, is_cms) | ||
3821 | except Exception as e: | ||
3822 | compare_log.info('[non fsm thread fail] [error={0}]'.format(traceback.format_exc())) | ||
3813 | #pool.shutdown(wait=True) | 3823 | #pool.shutdown(wait=True) |
3814 | 3824 | ||
3815 | def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True, is_cms=False): | 3825 | def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True, is_cms=False): |
... | @@ -3859,10 +3869,14 @@ def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ | ... | @@ -3859,10 +3869,14 @@ def compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, is_ |
3859 | return | 3869 | return |
3860 | 3870 | ||
3861 | # 查看此订单号下是否有未完成的文件,如果有,等?分钟 | 3871 | # 查看此订单号下是否有未完成的文件,如果有,等?分钟 |
3862 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc | 3872 | try: |
3863 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() | 3873 | doc_wait_file_class = HILDoc if application_entity == consts.HIL_PREFIX else AFCDoc |
3864 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) | 3874 | doc_wait_file_result = doc_wait_file_class.objects.filter(application_id=application_id, status=1).first() |
3865 | 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)) | 3875 | compare_log.info('doc_wait_file_result:{0}'.format(doc_wait_file_result)) |
3876 | 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)) | ||
3877 | except Exception as e: | ||
3878 | doc_wait_file_result = None | ||
3879 | compare_log.info('[get doc_wait_file_result fail] [error={0}]'.format(traceback.format_exc())) | ||
3866 | if doc_wait_file_result is not None: | 3880 | if doc_wait_file_result is not None: |
3867 | # 实时查询延迟时间 | 3881 | # 实时查询延迟时间 |
3868 | try: | 3882 | try: | ... | ... |
-
Please register or sign in to post a comment