From 542a2a1fab81cc8bf9b30d0cd7506f5e30d80a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Fri, 5 Aug 2022 23:11:44 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=AF=BC=E5=85=A5=E7=B1=BB=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `AppsManager` → `ServicesManager` --- main.py | 10 +++++----- utils/apps/manager.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 16a8b59..56c74cf 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,7 @@ from telegram.warnings import PTBUserWarning from config import config from logger import Log from utils.aiobrowser import AioBrowser -from utils.apps.manager import AppsManager +from utils.apps.manager import ServicesManager from utils.job.register import register_job from utils.mysql import MySQL from utils.plugins.register import register_plugin_handlers @@ -37,10 +37,10 @@ def main() -> None: # 传入服务并启动 Log.info("正在启动服务") - apps = AppsManager(mysql, redis, browser) - apps.refresh_list("./apps/*") - apps.import_module() - apps.add_service() + services = ServicesManager(mysql, redis, browser) + services.refresh_list("./apps/*") + services.import_module() + services.add_service() # 构建BOT Log.info("构建BOT") diff --git a/utils/apps/manager.py b/utils/apps/manager.py index b657086..f25a552 100644 --- a/utils/apps/manager.py +++ b/utils/apps/manager.py @@ -26,7 +26,7 @@ def listener_service(): return decorator -class AppsManager: +class ServicesManager: def __init__(self, mysql: MySQL, redis: RedisDB, browser: AioBrowser): self.browser = browser self.redis = redis