|
@@ -6,6 +6,7 @@ from app.api_data.platform_order.audio_qiyue import AudioQiyue
|
|
|
from app.api_data.platform_order.youshuge import get_youshuge_order_task
|
|
|
from app.api_data.platform_order.yuewen import get_yuewen_order_task
|
|
|
from app.api_data.platform_order.yangguang import yangguang
|
|
|
+from multiprocessing import Process
|
|
|
|
|
|
db = MysqlUtils()
|
|
|
|
|
@@ -33,8 +34,6 @@ def get_new_account(plactform):
|
|
|
def huasheng(start=None, end=None):
|
|
|
if start is None:
|
|
|
start = end = du.getNow()
|
|
|
-
|
|
|
- executor = ThreadPoolExecutor(max_workers=5)
|
|
|
accounts = get_account("花生")
|
|
|
if len(accounts) == 0:
|
|
|
return
|
|
@@ -149,16 +148,33 @@ def youshuge(start=None, end=None):
|
|
|
executor.shutdown()
|
|
|
|
|
|
def hourly():
|
|
|
- huasheng()
|
|
|
- qiyue()
|
|
|
- qiyueyousheng()
|
|
|
- wending()
|
|
|
- zhangdu()
|
|
|
- zhangzhongyun()
|
|
|
- yueweng()
|
|
|
- youshuge()
|
|
|
- yangguang()
|
|
|
-
|
|
|
+ p1 = Process(target=huasheng)
|
|
|
+ p2 = Process(target=qiyue)
|
|
|
+ p3 = Process(target=qiyueyousheng)
|
|
|
+ p4 = Process(target=wending)
|
|
|
+ p5 = Process(target=zhangdu)
|
|
|
+ p6 = Process(target=zhangzhongyun)
|
|
|
+ p7 = Process(target=yueweng)
|
|
|
+ p8 = Process(target=youshuge)
|
|
|
+ p9 = Process(target=yangguang)
|
|
|
+ p1.start()
|
|
|
+ p1.join()
|
|
|
+ p2.start()
|
|
|
+ p2.join()
|
|
|
+ p3.start()
|
|
|
+ p3.join()
|
|
|
+ p4.start()
|
|
|
+ p4.join()
|
|
|
+ p5.start()
|
|
|
+ p5.join()
|
|
|
+ p6.start()
|
|
|
+ p6.join()
|
|
|
+ p7.start()
|
|
|
+ p7.join()
|
|
|
+ p8.start()
|
|
|
+ p8.join()
|
|
|
+ p9.start()
|
|
|
+ p9.join()
|
|
|
|
|
|
def daily():
|
|
|
st = du.get_n_days(-10)
|
|
@@ -190,4 +206,5 @@ if __name__ == '__main__':
|
|
|
# zhangzhongyun()
|
|
|
# yangguang()
|
|
|
# huasheng("2021-04-12",'2021-05-10')
|
|
|
- yueweng("2021-05-11", '2021-05-11')
|
|
|
+ # yueweng("2021-05-11", '2021-05-11')
|
|
|
+ hourly()
|