소스 검색

update gevent_pool num: 20 -> 100

liqian 1 년 전
부모
커밋
44f9463be3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ad_predict.py

+ 1 - 1
ad_predict.py

@@ -36,7 +36,7 @@ def thompson_process(creative_id):
 def get_creative_id_with_thompson(mid, creative_id_list):
     """利用Thompson采样获取此次要展示的广告创意ID"""
     # 限制协程最大并发数:20
-    gevent_pool = pool.Pool(20)
+    gevent_pool = pool.Pool(100)
     tasks = [gevent_pool.spawn(thompson_process, creative_id) for creative_id in creative_id_list]
     gevent.joinall(tasks)
     thompson_res_list = [t.get() for t in tasks]