|
@@ -13,6 +13,7 @@ from concurrent.futures.thread import ThreadPoolExecutor
|
|
|
|
|
|
from flask import Flask, request, json
|
|
|
|
|
|
+from constant.ConfConstant import ConfConstant
|
|
|
from spider.PromoterFansInfo import PromoterFansInfo
|
|
|
from spider.PromoterInfoSpider import PromoterInfoSpider
|
|
|
from spider.PromoterLiveInfoSpider import PromoterLiveInfoSpider
|
|
@@ -30,9 +31,7 @@ def api_root():
|
|
|
def webhook_get_promoter():
|
|
|
rep = json.loads(request.data)
|
|
|
promoterId = rep["promoterId"]
|
|
|
- print(promoterId, '-----')
|
|
|
pool = ThreadPoolExecutor(max_workers=10)
|
|
|
- print(time.time(),'----00-----')
|
|
|
result = PromoterInfoSpider().PromoterInfoSpiderHandler(promoterId=promoterId)
|
|
|
pool.submit(PromoterFansInfo().PromoterFansInfoHandler(promoterId=promoterId))
|
|
|
pool.submit(PromoterLiveInfoSpider().PromoterLiveInfoSpiderHander(promoterId=promoterId))
|
|
@@ -43,4 +42,4 @@ def webhook_get_promoter():
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- app.run(port=9999, host='127.0.0.1', debug=True)
|
|
|
+ app.run(port=9999, host=ConfConstant.URL, debug=True)
|