Administrator
4 天以前 48fb7a00951f91bdc707e5dd2d196e5bccb752c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
低吸数据推送
"""
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())