Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
jd_data_process
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5bdf6cfd
authored
Oct 14, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
b9b86098
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
push_to_mq.py
push_to_mq.py
View file @
5bdf6cfd
...
...
@@ -3,10 +3,16 @@ import json
import
pika
# 推送消息到 mq测试脚本
#
# username = 'huntadmin'
# password = 'jy2y2900'
# host = '192.168.1.237'
# port = 5672
# queue_name = 'liexin_nplm_filter_sku_data'
username
=
'huntadmin'
password
=
'jy2y2900'
host
=
'1
92.168.1.237
'
host
=
'1
72.18.137.29
'
port
=
5672
queue_name
=
'liexin_nplm_filter_sku_data'
...
...
@@ -29,6 +35,24 @@ def push_mq(message: str):
# {"goods_id":1170115972487102103,"spu_id":2170115972437912400,"platform":1,"shop_id":1}
if
__name__
==
'__main__'
:
data
=
{
"goods_id"
:
11
70122329267322783
,
"spu_id"
:
2170122329155225702
,
"platform"
:
1
,
"shop_id"
:
1
}
data
=
{
"goods_id"
:
11
51525960495265804
,
"spu_id"
:
2151133166540743705
,
"platform"
:
1
,
"shop_id"
:
2
}
msg
=
json
.
dumps
(
data
,
ensure_ascii
=
False
)
push_mq
(
msg
)
data
=
{
"goods_id"
:
1151033368840495919
,
"spu_id"
:
2151033368813527600
,
"platform"
:
1
,
"shop_id"
:
2
}
msg
=
json
.
dumps
(
data
,
ensure_ascii
=
False
)
push_mq
(
msg
)
data
=
{
"goods_id"
:
1151033372498623926
,
"spu_id"
:
2151033372494531806
,
"platform"
:
1
,
"shop_id"
:
2
}
msg
=
json
.
dumps
(
data
,
ensure_ascii
=
False
)
push_mq
(
msg
)
data
=
{
"goods_id"
:
1171169666318406723
,
"spu_id"
:
2151033370259441104
,
"platform"
:
1
,
"shop_id"
:
2
}
msg
=
json
.
dumps
(
data
,
ensure_ascii
=
False
)
push_mq
(
msg
)
data
=
{
"goods_id"
:
1151033368983156030
,
"spu_id"
:
2151033369155518807
,
"platform"
:
1
,
"shop_id"
:
2
}
msg
=
json
.
dumps
(
data
,
ensure_ascii
=
False
)
push_mq
(
msg
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment