Refactoring and cleanup codebase (starting...)
This commit is contained in:
parent
8a8cf8af30
commit
20465600b1
@ -58,6 +58,7 @@ async def consume_from_queue():
|
|||||||
queue = await channel.declare_queue(RABBITMQ_QUEUE, durable=True)
|
queue = await channel.declare_queue(RABBITMQ_QUEUE, durable=True)
|
||||||
|
|
||||||
# Потребляем сообщения
|
# Потребляем сообщения
|
||||||
|
# noinspection PyTypeChecker
|
||||||
async for message in queue:
|
async for message in queue:
|
||||||
async with message.process(): # Авто подтверждение сообщения
|
async with message.process(): # Авто подтверждение сообщения
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
from email.policy import default
|
|
||||||
from jinja2 import TemplateNotFound
|
from jinja2 import TemplateNotFound
|
||||||
|
|
||||||
from flask import Blueprint, render_template, jsonify, abort
|
from flask import Blueprint, render_template, jsonify, abort
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from flask import Blueprint, render_template, jsonify
|
from flask import Blueprint, jsonify
|
||||||
|
|
||||||
webui = Blueprint('webui', __name__, url_prefix='/telezab')
|
webui = Blueprint('webui', __name__, url_prefix='/telezab')
|
||||||
|
|
||||||
@ -9,5 +9,5 @@ def heartbeat():
|
|||||||
|
|
||||||
@webui.route('/', defaults={'path': ''})
|
@webui.route('/', defaults={'path': ''})
|
||||||
@webui.route('/<path:path>')
|
@webui.route('/<path:path>')
|
||||||
def catch_all(path):
|
def catch_all():
|
||||||
return webui.send_static_file("index.html")
|
return webui.send_static_file("index.html")
|
||||||
Loading…
x
Reference in New Issue
Block a user