From 20465600b1b0ff514495758bd9d3c18d12ffe53b Mon Sep 17 00:00:00 2001 From: UdoChudo Date: Sun, 23 Feb 2025 14:46:10 +0500 Subject: [PATCH] Refactoring and cleanup codebase (starting...) --- rabbitmq.py | 1 + webui/__init__.py | 1 - webui/index.py | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rabbitmq.py b/rabbitmq.py index a45382c..74f6ea3 100644 --- a/rabbitmq.py +++ b/rabbitmq.py @@ -58,6 +58,7 @@ async def consume_from_queue(): queue = await channel.declare_queue(RABBITMQ_QUEUE, durable=True) # Потребляем сообщения + # noinspection PyTypeChecker async for message in queue: async with message.process(): # Авто подтверждение сообщения try: diff --git a/webui/__init__.py b/webui/__init__.py index 693aee4..48a8f2b 100644 --- a/webui/__init__.py +++ b/webui/__init__.py @@ -1,4 +1,3 @@ -from email.policy import default from jinja2 import TemplateNotFound from flask import Blueprint, render_template, jsonify, abort diff --git a/webui/index.py b/webui/index.py index 20e12e2..4982a05 100644 --- a/webui/index.py +++ b/webui/index.py @@ -1,4 +1,4 @@ -from flask import Blueprint, render_template, jsonify +from flask import Blueprint, jsonify webui = Blueprint('webui', __name__, url_prefix='/telezab') @@ -9,5 +9,5 @@ def heartbeat(): @webui.route('/', defaults={'path': ''}) @webui.route('/') -def catch_all(path): +def catch_all(): return webui.send_static_file("index.html") \ No newline at end of file