From db2ee802cab3856a2a297ce64392bddaa45017b3 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Tue, 9 Apr 2024 15:35:18 +0800 Subject: [PATCH] chore: log optimization --- channel/chat_channel.py | 1 - common/linkai_client.py | 4 ++++ requirements.txt | 2 +- voice/audio_convert.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/channel/chat_channel.py b/channel/chat_channel.py index 689fa0a..b3f8d1a 100644 --- a/channel/chat_channel.py +++ b/channel/chat_channel.py @@ -4,7 +4,6 @@ import threading import time from asyncio import CancelledError from concurrent.futures import Future, ThreadPoolExecutor -from concurrent import futures from bridge.context import * from bridge.reply import * diff --git a/common/linkai_client.py b/common/linkai_client.py index 071be0a..559f7d1 100644 --- a/common/linkai_client.py +++ b/common/linkai_client.py @@ -4,6 +4,7 @@ from common.log import logger from linkai import LinkAIClient, PushMsg from config import conf, pconf, plugin_config, available_setting from plugins import PluginManager +import time chat_client: LinkAIClient @@ -62,6 +63,9 @@ def start(channel): host="link-ai.chat", channel=channel) chat_client.config = _build_config() chat_client.start() + time.sleep(1.5) + if chat_client.client_id: + logger.info("[LinkAI] 可前往控制台进行线上登录和配置:https://link-ai.tech/console/clients") def _build_config(): diff --git a/requirements.txt b/requirements.txt index aed76c3..dc2477b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ chardet>=5.1.0 Pillow pre-commit web.py -linkai>=0.0.3.7 +linkai>=0.0.5.0 diff --git a/voice/audio_convert.py b/voice/audio_convert.py index 5c80528..4263678 100644 --- a/voice/audio_convert.py +++ b/voice/audio_convert.py @@ -6,7 +6,7 @@ from common.log import logger try: import pysilk except ImportError: - logger.warn("import pysilk failed, wechaty voice message will not be supported.") + logger.debug("import pysilk failed, wechaty voice message will not be supported.") from pydub import AudioSegment