add proper rabbitMQ extension

This commit is contained in:
Gardient
2021-09-30 22:57:13 +03:00
parent b50c67ae1e
commit 71c1e322aa
4 changed files with 61 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ from flask import Flask, Blueprint
from . import commands, login, target_exchange, target, registration
from .exceptions import ApiException
from .extensions import db, migrate, jwt, apispec
from .extensions import db, migrate, jwt, apispec, rabbit
from .settings import ProdConfig, Config
@@ -31,6 +31,7 @@ def register_extensions(app: Flask):
migrate.init_app(app, db)
jwt.init_app(app)
apispec.init_app(app)
rabbit.init_app(app)
def register_blueprints(app: Flask):
@@ -82,6 +83,7 @@ def register_shellcontext(app: Flask):
"""Shell context objects."""
return {
'db': db,
'rabbit': rabbit,
'TargetExchange': target_exchange.models.TargetExchange,
'Target': target.models.Target,
'Registration': registration.models.Registration,