This commit is contained in:
HuangHai
2026-01-14 07:33:21 +08:00
parent ab8ec615f2
commit 1bdfde98c6
7 changed files with 5 additions and 11 deletions

View File

@@ -9,22 +9,16 @@ project_root = os.path.dirname(os.path.abspath(__file__))
if project_root not in sys.path:
sys.path.append(project_root)
# 配置日志
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
try:
from Apps.TeLaiDian.Service import TeLaiDianService
from Apps.TeLaiDian import Opener, Crawler, Kit
# 初始化日志文件记录
logger = Kit.setup_logger("T4_TeLaiDian")
except KeyboardInterrupt:
logging.info("\n🛑 用户在初始化阶段手动停止了程序。")
print("\n🛑 用户在初始化阶段手动停止了程序。")
sys.exit(0)
except Exception as e:
logging.error(f"❌ 初始化导入失败: {e}")
print(f"❌ 初始化导入失败: {e}")
sys.exit(1)
async def run_process():