Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
AVPetukhov
Practica 2021
Commits
d37447a8
Commit
d37447a8
authored
Jul 08, 2021
by
AVPetukhov
Browse files
Upload New File
parent
e319913d
Changes
1
Show whitespace changes
Inline
Side-by-side
main.py
0 → 100644
View file @
d37447a8
import
pika
credentials
=
pika
.
PlainCredentials
(
'Anton'
,
'Anton'
)
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
host
=
'217.9.89.214'
,
port
=
5672
,
virtual_host
=
'/'
,
credentials
=
credentials
))
channel
=
connection
.
channel
()
channel
.
queue_declare
(
queue
=
'Anton'
)
for
num
in
range
(
101
):
channel
.
basic_publish
(
exchange
=
''
,
routing_key
=
'Anton'
,
body
=
str
(
num
*
num
))
print
(
"Sent"
)
connection
.
close
()
\ 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