|
@@ -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]
|