Commit dbb543bc authored by MVMolchanova's avatar MVMolchanova
Browse files

Upload New File

parent 2241ff51
import pika
import json
x = list(range(0, 101, 1))
y = []
for num in x:
a = num
y.append(a)
z = [x, y]
json_string = json.dumps(z)
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')
channel.basic_publish(exchange='', routing_key='Anton', body=json_string)
print("Sent")
connection.close()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment