ssl+mdp
This commit is contained in:
parent
73bc370e59
commit
e63b25278f
3 changed files with 8 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
|
config.py
|
||||||
|
|
4
config.py.example
Normal file
4
config.py.example
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# REPLACE password here
|
||||||
|
URL='amqps://oie:****@rabbitmq.crans.org:5671/%2F'
|
|
@ -3,8 +3,10 @@
|
||||||
import pika
|
import pika
|
||||||
import json
|
import json
|
||||||
import dump
|
import dump
|
||||||
|
import config
|
||||||
|
|
||||||
conn = pika.BlockingConnection(pika.ConnectionParameters(host='civet.crans.org'))
|
params = pika.URLParameters(config.URL)
|
||||||
|
conn = pika.BlockingConnection(params)
|
||||||
ch = conn.channel()
|
ch = conn.channel()
|
||||||
ch.queue_declare(queue='CransTicket')
|
ch.queue_declare(queue='CransTicket')
|
||||||
def callback(ch, method, properties, body):
|
def callback(ch, method, properties, body):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue