This commit is contained in:
18
src/rabbitmqqueue.py
Normal file
18
src/rabbitmqqueue.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import pika
|
||||
from config import *
|
||||
|
||||
"""
|
||||
Rabbitmq setup
|
||||
"""
|
||||
|
||||
__author__ = '@tormakris'
|
||||
__copyright__ = "Copyright 2020, Birbnetes Team"
|
||||
__module_name__ = "endpoints"
|
||||
__version__text__ = "1"
|
||||
|
||||
credentials = pika.PlainCredentials(RABBITMQ_USERNAME, RABBITMQ_PASSWORD)
|
||||
rabbitmq = pika.BlockingConnection(pika.ConnectionParameters(host=RABBITMQ_HOST,credentials=credentials))
|
||||
rabbitmq_channel = rabbitmq.channel()
|
||||
rabbitmq_channel.queue_declare(RABBITMQ_QUEUE)
|
||||
Reference in New Issue
Block a user