"""
|
低吸数据推送
|
"""
|
import json
|
|
import requests
|
|
import concurrent.futures
|
|
__data_push_thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=5)
|
__big_order_data_push_thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=10)
|
|
|
def push_limit_up_list(datas):
|
"""
|
推送涨停列表信息
|
@param datas:
|
@return:
|
"""
|
|
def push():
|
requests.post("http://127.0.0.1:9008/upload_limit_up_list", json=json.dumps(datas), timeout=3)
|
|
__data_push_thread_pool.submit(
|
lambda: push())
|
|
|
def push_big_order(datas):
|
"""
|
推送大单信息
|
@param datas:
|
@return:
|
"""
|
|
def push():
|
requests.post("http://127.0.0.1:9008/upload_big_order_datas", json=json.dumps(datas), timeout=3)
|
|
__big_order_data_push_thread_pool.submit(
|
lambda: push())
|
|
|
def push_block_in(datas):
|
"""
|
推送板块流入信息
|
@param datas:
|
@return:
|
"""
|
|
def push():
|
requests.post("http://127.0.0.1:9008/upload_block_in_datas", json=json.dumps(datas), timeout=3)
|
|
__data_push_thread_pool.submit(
|
lambda: push())
|