From 4a96c448feb8caf33c8b252309b30cc8d87672e9 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 19 十一月 2024 10:52:59 +0800 Subject: [PATCH] L2测试 --- l2_test.py | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/l2_test.py b/l2_test.py index 363f798..5f91eea 100644 --- a/l2_test.py +++ b/l2_test.py @@ -2,6 +2,7 @@ import time from huaxin_client import l2_client_test, l1_subscript_codes_manager +from log_module.log import logger_local_huaxin_l2_upload def run(): @@ -12,11 +13,20 @@ cpu_count = 16 page_size = int(len(codes) / cpu_count) + 1 + big_order_queue = multiprocessing.Queue() + for i in range(cpu_count): process = multiprocessing.Process(target=l2_client_test.run, - args=(codes[i * page_size:(i + 1) * page_size],)) + args=(codes[i * page_size:(i + 1) * page_size], big_order_queue,)) process.start() + while True: + try: + data = big_order_queue.get() + logger_local_huaxin_l2_upload.info(f"{data}") + except: + pass + if __name__ == "__main__": run() -- Gitblit v1.8.0