fix: 认证系统、登录兼容性、运行时配置、钉钉通知及代码清理

- 实现 JWT 认证中间件,保护配置管理和任务删除接口
- 修复 ConfigView 登录按钮(Vue 3 inject 替代 $root)
- 页面刷新时通过 /api/auth/me 校验 token 有效性
- max_concurrent_builds 修改后运行时即时生效
- 实现钉钉 webhook 通知(构建成功/失败自动推送)
- 删除未使用的 useWebSocket composable
- log_streamer 使用 LOG_QUEUE_MAX_SIZE 配置常量
This commit is contained in:
shen
2026-06-08 20:35:05 +08:00
parent f5919a8229
commit e18f33d60f
14 changed files with 262 additions and 91 deletions
+3 -1
View File
@@ -5,6 +5,8 @@ from datetime import datetime
from pathlib import Path
from typing import Dict, AsyncGenerator
from ..config import LOG_QUEUE_MAX_SIZE
class LogStreamer:
"""日志流管理器"""
@@ -16,7 +18,7 @@ class LogStreamer:
def create_queue(self, task_id: str) -> asyncio.Queue:
"""创建任务的日志队列"""
queue = asyncio.Queue(maxsize=1000)
queue = asyncio.Queue(maxsize=LOG_QUEUE_MAX_SIZE)
self._queues[task_id] = queue
self._log_lines[task_id] = []
return queue