ck 4 years ago
parent
commit
20776737f1
1 changed files with 5 additions and 7 deletions
  1. 5 7
      app/api_data/get_order.py

+ 5 - 7
app/api_data/get_order.py

@@ -86,16 +86,14 @@ def huasheng(start=None,end=None,new=None):
 def qiyue(start=None,end=None,new=None):
     if start is None:
         start = end = du.getNow()
-
-    executor = ThreadPoolExecutor(max_workers=1)
     accounts = get_account("七悦") if new is None else get_new_account('七悦')
-    if len(accounts)==0:
+    if len(accounts) == 0:
         return
     else:
         print(f'七悦有账号{len(accounts)}个')
     for account in accounts:
-            executor.submit(get_qiyue_order_task, start, end, account)
-    executor.shutdown(True)
+            get_qiyue_order_task(start, end, account)
+
 
 
 def wending(start=None,end=None,new=None):
@@ -148,8 +146,8 @@ def daily():
 
 if __name__ == '__main__':
     # yangguang()
-    huasheng('2020-12-01','2021-02-22')
-    qiyue('2020-12-01','2021-02-22')
+    # huasheng('2020-12-01','2021-02-22')
+    qiyue()
     # wending()
 
     # zhangdu('2020-12-20','2021-02-22')