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
156a8346
authored
Aug 28, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add server
parent
597c0e52
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
server.py
server.py
View file @
156a8346
...
...
@@ -25,7 +25,8 @@ def listen_from_mq():
channel
=
conn
.
channel
()
channel
.
queue_declare
(
queue
=
config
.
rabbit_mq_queue_consumer
,
durable
=
True
)
# 注意 py3.8 的api 和 python3.6的api 是有区别的
channel
.
basic_consume
(
callback
,
queue
=
config
.
rabbit_mq_queue_consumer
)
# channel.basic_consume(callback, queue=config.rabbit_mq_queue_consumer)
channel
.
basic_consume
(
queue
=
config
.
rabbit_mq_queue_consumer
,
on_message_callback
=
callback
)
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