4
0

rewritten for mules
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2020-04-20 22:53:12 +02:00
parent f4e880cb0f
commit 57a46dc259
8 changed files with 112 additions and 90 deletions

View File

@ -1,26 +0,0 @@
#!/usr/bin/env python3
import pika
from config import *
"""
Rabbitmq setup
"""
__author__ = '@tormakris'
__copyright__ = "Copyright 2020, Birbnetes Team"
__module_name__ = "rabbit"
__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.exchange_declare(exchange=RABBITMQ_EXCHANGE, exchange_type='fanout')
"""Usage:
from rabbit import rabbitmq_channel
rabbitmq_channel.basic_publish(
exchange=RABBITMQ_EXCHANGE,
routing_key='feature',
body=generated_tag)
"""

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
from flask import request, current_app, abort
from flask import request, abort
from functools import wraps