declare exchange
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-08-04 03:33:47 +02:00
parent 80d115e488
commit f244721cd1
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -64,6 +64,17 @@ logger.addHandler(handler)
api.add_resource(SampleResource, "/sample")
api.add_resource(SampleParameterResource, '/sample/<tag>')
@app.before_first_request
def before_first_request():
ch = fpika.channel()
ch.exchange_declare(exchange=RABBITMQ_EXCHANGE,
exchange_type='fanout',
durable=True,
auto_delete=True)
fpika.return_channel(ch)
if __name__ == "__main__":
app.run(
debug=bool(DEBUG),