Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
data_server
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
36ed080c
authored
Aug 25, 2024
by
larosa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
py3.6
parent
00d34033
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
server.py
server.py
View file @
36ed080c
...
...
@@ -24,7 +24,8 @@ def listen_from_mq():
credentials
=
credentials
))
channel
=
conn
.
channel
()
channel
.
queue_declare
(
queue
=
config
.
rabbit_mq_queue_consumer
,
durable
=
True
)
channel
.
basic_consume
(
queue
=
config
.
rabbit_mq_queue_consumer
,
on_message_callback
=
callback
)
# 注意 py3.8 的api 和 python3.6的api 是有区别的
channel
.
basic_consume
(
callback
,
queue
=
config
.
rabbit_mq_queue_consumer
)
channel
.
start_consuming
()
...
...
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