| | |
| | | |
| | | |
| | | def run_async(pipe_l2): |
| | | logger_system.info("L1进程ID:", os.getpid()) |
| | | logger_system.info("L1进程ID:{}", os.getpid()) |
| | | t1 = threading.Thread(target=lambda: run(pipe_l2), daemon=True) |
| | | t1.start() |
| | | |
| | |
| | | if code not in target_codes: |
| | | return |
| | | # 如果最近的活动时间小于2s就不需要运行 |
| | | if code not in order_detail_upload_active_time_dict or time.time() - order_detail_upload_active_time_dict[code] > 2: |
| | | t = threading.Thread(target=lambda: __run_upload_order(code), daemon=True) |
| | | t.start() |
| | | |
| | | if code not in transaction_upload_active_time_dict or time.time() - transaction_upload_active_time_dict[code] > 2: |
| | | t = threading.Thread(target=lambda: __run_upload_trans(code), daemon=True) |
| | | t.start() |
| | | # TODO 测试先取消 |
| | | # if code not in order_detail_upload_active_time_dict or time.time() - order_detail_upload_active_time_dict[code] > 2: |
| | | # t = threading.Thread(target=lambda: __run_upload_order(code), daemon=True) |
| | | # t.start() |
| | | # |
| | | # if code not in transaction_upload_active_time_dict or time.time() - transaction_upload_active_time_dict[code] > 2: |
| | | # t = threading.Thread(target=lambda: __run_upload_trans(code), daemon=True) |
| | | # t.start() |
| | | |
| | | |
| | | def run_upload_common(): |