mns-common 1.2.3.4__py3-none-any.whl → 1.2.3.7__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/constant/redis_msg_constant.py +17 -2
- {mns_common-1.2.3.4.dist-info → mns_common-1.2.3.7.dist-info}/METADATA +1 -1
- {mns_common-1.2.3.4.dist-info → mns_common-1.2.3.7.dist-info}/RECORD +7 -5
- {mns_common-1.2.3.4.dist-info → mns_common-1.2.3.7.dist-info}/WHEEL +0 -0
- {mns_common-1.2.3.4.dist-info → mns_common-1.2.3.7.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)
|
|
@@ -11,8 +11,23 @@ TOPIC
|
|
|
11
11
|
'''
|
|
12
12
|
|
|
13
13
|
# redis 消息TOPIC
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
'''
|
|
16
|
+
ths 概念topic
|
|
17
|
+
'''
|
|
18
|
+
|
|
19
|
+
THS_CONCEPT_MSG_TOPIC = 'THS_CONCEPT_MSG_TOPIC'
|
|
20
|
+
'''
|
|
21
|
+
MSG
|
|
22
|
+
'''
|
|
23
|
+
THS_NEW_CONCEPT_ADD_MSG = 'THS_NEW_CONCEPT_ADD_MSG'
|
|
24
|
+
|
|
25
|
+
'''
|
|
26
|
+
自选板块股票 topic
|
|
27
|
+
'''
|
|
28
|
+
|
|
29
|
+
SELF_CHOOSE_TOPIC = 'SELF_CHOOSE_TOPIC'
|
|
15
30
|
'''
|
|
16
31
|
MSG
|
|
17
32
|
'''
|
|
18
|
-
|
|
33
|
+
SELF_CHOOSE_CHANGE_MSG = 'SELF_CHOOSE_CHANGE_MSG'
|
|
@@ -85,6 +85,8 @@ 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
92
|
mns_common/component/self_choose/self_choose_service_api.py,sha256=eV1nkP2_3EOVST4q8BThy68YVgqoYz5cWrJmyfwq09I,519
|
|
@@ -96,7 +98,7 @@ mns_common/constant/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZ
|
|
|
96
98
|
mns_common/constant/black_list_classify_enum.py,sha256=I8U_DcltzYvlWjgn-TFLImgVgPuO0lxMnEJAQJBljdo,3995
|
|
97
99
|
mns_common/constant/db_name_constant.py,sha256=nCYyvRvKYdlDij4575GfcRicUYPZAU07J3LGHyVjVwM,2994
|
|
98
100
|
mns_common/constant/price_enum.py,sha256=nhcPxk0AFdQAp8IsNr5EP9xURLqqJuSl6ljIzTp7Wyo,1093
|
|
99
|
-
mns_common/constant/redis_msg_constant.py,sha256=
|
|
101
|
+
mns_common/constant/redis_msg_constant.py,sha256=fMtI_WbJ2IkMX4qGwvR5MkMO0NqU8XgUUZqQzHIRscU,501
|
|
100
102
|
mns_common/constant/self_choose_constant.py,sha256=rHaVnFy3T2uF9T9y6utucyz1rpbbe0Zjb1f8ZAChXl0,492
|
|
101
103
|
mns_common/db/MongodbUtil.py,sha256=9SRED0DJH-4_NzbVehdm2x07Ts68YYm87nEvCywHIf4,11750
|
|
102
104
|
mns_common/db/MongodbUtilLocal.py,sha256=xLUTeeZ83BbqPtUEwy7QmPtkSfwPyNB_5ggkn-eMpBQ,7560
|
|
@@ -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.7.dist-info/METADATA,sha256=lMKXGtkiL59v_FIIG8zV3Su767p7RXZcZ9tkgGTh4rY,61
|
|
115
|
+
mns_common-1.2.3.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
116
|
+
mns_common-1.2.3.7.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
117
|
+
mns_common-1.2.3.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|