mns-common 1.2.3.5__py3-none-any.whl → 1.2.3.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mns_common/component/redis_msg/__init__.py +7 -0
- mns_common/component/redis_msg/redis_msg_publish_service.py +17 -0
- mns_common/component/self_choose/self_choose_service_api.py +7 -0
- {mns_common-1.2.3.5.dist-info → mns_common-1.2.3.8.dist-info}/METADATA +1 -1
- {mns_common-1.2.3.5.dist-info → mns_common-1.2.3.8.dist-info}/RECORD +7 -5
- {mns_common-1.2.3.5.dist-info → mns_common-1.2.3.8.dist-info}/WHEEL +0 -0
- {mns_common-1.2.3.5.dist-info → mns_common-1.2.3.8.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
file_path = os.path.abspath(__file__)
|
|
5
|
+
end = file_path.index('mns') + 16
|
|
6
|
+
project_path = file_path[0:end]
|
|
7
|
+
sys.path.append(project_path)
|
|
8
|
+
import redis
|
|
9
|
+
|
|
10
|
+
# 连接到Redis服务器
|
|
11
|
+
r = redis.Redis(host='localhost', port=6379, db=0)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 发送消息
|
|
15
|
+
def send_redis_msg(topic, message):
|
|
16
|
+
# 将消息推送到队列中
|
|
17
|
+
r.publish(topic, message)
|
|
@@ -16,3 +16,10 @@ from functools import lru_cache
|
|
|
16
16
|
@lru_cache(maxsize=None)
|
|
17
17
|
def get_self_choose_plate_list():
|
|
18
18
|
return mongodb_util.find_all_data(db_name_constant.SELF_CHOOSE_PLATE)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# 获取自选股票
|
|
22
|
+
@lru_cache()
|
|
23
|
+
def get_self_choose_stocks():
|
|
24
|
+
self_choose_stocks_df = mongodb_util.find_all_data(db_name_constant.SELF_CHOOSE_STOCK)
|
|
25
|
+
return self_choose_stocks_df
|
|
@@ -85,9 +85,11 @@ mns_common/component/qmt/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNd
|
|
|
85
85
|
mns_common/component/qmt/qmt_buy_service.py,sha256=tLTgrSxCcxuMhADRBBrW4ZWR_3MdbMZvvMdH5hbwyJU,7190
|
|
86
86
|
mns_common/component/real_time/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
87
87
|
mns_common/component/real_time/real_time_common_service_api.py,sha256=Sq9OBC4ZZq9X7CaK09tmUMaXF7xibcyzrX0LOimxAzk,1378
|
|
88
|
+
mns_common/component/redis_msg/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
89
|
+
mns_common/component/redis_msg/redis_msg_publish_service.py,sha256=jcNEfQpARCPyl_eFXTksL2aHn1r5Lnv1qns4lVMCToI,381
|
|
88
90
|
mns_common/component/self_choose/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
89
91
|
mns_common/component/self_choose/black_list_service_api.py,sha256=bBWXwvf7M3_ys5oZNHDMtAAqF4HYbsqfSh1zOd8UvuY,1980
|
|
90
|
-
mns_common/component/self_choose/self_choose_service_api.py,sha256=
|
|
92
|
+
mns_common/component/self_choose/self_choose_service_api.py,sha256=ViAszS64Dw0E9vY3yarT9hPpGvmC28N2FHg2VE83k94,716
|
|
91
93
|
mns_common/component/trade_date/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
92
94
|
mns_common/component/trade_date/trade_date_common_service_api.py,sha256=PHrcUjgLdNKbqyMGot0poKtiLBys_wRZoheMhPJE-U4,3032
|
|
93
95
|
mns_common/component/zt/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
@@ -109,7 +111,7 @@ mns_common/utils/date_handle_util.py,sha256=qkEyKLYiVq6qpKVp32MLKwRtGKVBK6AY5at2
|
|
|
109
111
|
mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
|
|
110
112
|
mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
|
|
111
113
|
mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
|
|
112
|
-
mns_common-1.2.3.
|
|
113
|
-
mns_common-1.2.3.
|
|
114
|
-
mns_common-1.2.3.
|
|
115
|
-
mns_common-1.2.3.
|
|
114
|
+
mns_common-1.2.3.8.dist-info/METADATA,sha256=wgl6yyuhLJ2Qs55Qf8s2Stnw5q4s3ll12d4VDoIBv5g,61
|
|
115
|
+
mns_common-1.2.3.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
116
|
+
mns_common-1.2.3.8.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
117
|
+
mns_common-1.2.3.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|