ck 4 年 前
コミット
3fc0ed22f2
1 ファイル変更3 行追加4 行削除
  1. 3 4
      dgp/get_ad_hourly.py

+ 3 - 4
dgp/get_ad_hourly.py

@@ -13,10 +13,9 @@ import random
 import pymysql
 from datetime import datetime
 import token_list as tl
-import importlib
 from concurrent.futures import ThreadPoolExecutor
-importlib.reload(tl)
 
+max_workers=5
 token_list_q = tl.token_list_qq
 token_list_v = tl.token_list_vx
 
@@ -113,7 +112,7 @@ def start_all_job():
     start_time = time.strftime("%Y-%m-%d",time.localtime(start_date_unixtime))
     print(time.strftime("%Y-%m-%d %H",time.localtime(time.time()//3600*3600)))
 
-    executor = ThreadPoolExecutor(max_workers=30)
+    executor = ThreadPoolExecutor(max_workers=max_workers)
     start=time.time()
     q_li=[]
     for x in token_list_q :
@@ -123,7 +122,7 @@ def start_all_job():
     end=time.time()
     print(end-start)
 
-    executor = ThreadPoolExecutor(max_workers=30)
+    executor = ThreadPoolExecutor(max_workers=max_workers)
     v_li=[]
     for y in token_list_v :
         executor.submit(get_vx_data, y, start_time, start_date_unixtime, v_li)