浏览代码

取消主线程等待子线程结束

peng 1 年之前
父节点
当前提交
b7fe3d0c53
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      Controller/Cron/CronTaskController.py

+ 0 - 4
Controller/Cron/CronTaskController.py

@@ -1506,7 +1506,6 @@ class CronComparedDataView(View):
             thread = threading.Thread(target=CronComparedDataView.thread_compared_paypal_order,
                                       args=(order_list['transaction_details'], end_date))
             thread.start()  # 启动线程
-            thread.join()  # 主线程等待子线程结束
             return response.json(0)
         except Exception as e:
             LOGGER.info('CronComparedDataView.compared_paypal_order, errLine:{}, errMsg:{}'.format(
@@ -1592,7 +1591,6 @@ class CronComparedDataView(View):
             thread = threading.Thread(target=CronComparedDataView.thread_compared_wechat_order,
                                       args=(order_list,))
             thread.start()
-            thread.join()  # 主线程等待子线程结束
             return response.json(0)
         except Exception as e:
             LOGGER.info('CronComparedDataView.compared_wechat_order, errLine:{}, errMsg:{}'.format(
@@ -1652,7 +1650,6 @@ class CronComparedDataView(View):
             thread = threading.Thread(target=CronComparedDataView.thread_compared_alipay_order,
                                       args=(order_list,))
             thread.start()
-            thread.join()  # 主线程等待子线程结束
             return response.json(0)
         except Exception as e:
             LOGGER.info('CronComparedDataView.compared_alipay_order, errLine:{}, errMsg:{}'.format(
@@ -1702,7 +1699,6 @@ class CronComparedDataView(View):
             thread = threading.Thread(target=CronComparedDataView.thread_compared_ansjer_order,
                                       args=(list(order_qs), start_date))
             thread.start()  # 启动线程
-            thread.join()  # 主线程等待子线程结束
             return response.json(0)
         except Exception as e:
             LOGGER.info('CronComparedDataView.compared_ansjer_order, errLine:{}, errMsg:{}'.format(