chore(root): 收纳根目录调试产物与项目级文件
**项目级文件**: - configs/mkdocs.yml mkdocs 站点配置 - jumpserver-webcli/ANALYSIS.md webcli 调试分析报告 - jumpserver-webcli/CHANGELOG.md webcli 变更日志 - jumpserver-webcli/deploy_0802_*.txt 0802 部署调试输出(4 个) - jumpserver-webcli/diag_0802_*.txt 0802 诊断输出(3 个) - jumpserver-webcli/diag_184715.txt 18:47:15 诊断输出 - tests/test_quick_rules.py quick_rules API 测试 - temp/ 临时调试脚本目录(5 个:check_tables + 调试 + rename_dzpc + ts-check + inspect_batch) **交付报告**: - overview.md 「结束会话失败」修复交付报告(2026-07-30,ChatPanel.vue 三件套修复) **会话调试上下文**: - dedup_context.txt / dedup2.txt 去重调试上下文 - pattern_check.txt / pattern_context.txt 模式检查 - option_button_context.txt / option_select_context.txt 选项按钮/选择上下文 - qid.txt 会话 ID 记录 - yixuan_context.txt 艺璇任务上下文 - final_check.txt 最终检查 **部署脚本输出**: - deploy_v11.txt / deploy_h5_v11.txt v11 部署命令输出 合计 27 文件(含 1 项目文档 + 22 调试上下文 + 4 jumpserver webcli 调试 + 1 mkdocs 配置 + 1 测试 + 1 temp/ + 2 部署输出)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import sys
|
||||
sys.path.insert(0, "/app")
|
||||
from app.database import Base as DB_Base
|
||||
import app.models
|
||||
from app.models.base import Base as Model_Base
|
||||
from app.models import RecommendProgress, EmployeeProfileCache
|
||||
|
||||
print("DB_Base.metadata is Model_Base.metadata:", DB_Base.metadata is Model_Base.metadata)
|
||||
print("DB_Base:", DB_Base)
|
||||
print("Model_Base:", Model_Base)
|
||||
print("Total tables in DB_Base.metadata:", len(DB_Base.metadata.tables))
|
||||
print("RecommendProgress table:", DB_Base.metadata.tables.get("recommend_progress"))
|
||||
print("EmployeeProfileCache table:", DB_Base.metadata.tables.get("employee_profile_cache"))
|
||||
|
||||
# 列出所有 recommend / employee_profile 表
|
||||
for name in sorted(DB_Base.metadata.tables.keys()):
|
||||
if "recommend" in name or "employee_profile" in name:
|
||||
print("FOUND:", name)
|
||||
@@ -0,0 +1,52 @@
|
||||
# 早班巡检 - 服务器检查批处理 (2026-07-29)
|
||||
# 注:此文件将被上传到 /tmp 并通过 batch 子命令执行
|
||||
|
||||
# === 2.1 Docker 容器状态 ===
|
||||
echo "=== [1/8] docker ps -a ==="
|
||||
docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'
|
||||
|
||||
echo ""
|
||||
echo "=== [2/8] 健康异常的容器 ==="
|
||||
docker ps -a --filter 'status=exited' --format '{{.Names}} {{.Status}}'
|
||||
docker ps -a --filter 'status=restarting' --format '{{.Names}} {{.Status}}'
|
||||
|
||||
# === 2.2 后端 API 健康 ===
|
||||
echo ""
|
||||
echo "=== [3/8] backend health ==="
|
||||
docker ps --filter 'name=wecom_it_backend' --format '{{.Names}} {{.Status}}'
|
||||
curl -sS -o /tmp/health_out.txt -w 'HTTP %{http_code} | %{time_total}s\n' http://127.0.0.1:8000/health
|
||||
cat /tmp/health_out.txt 2>/dev/null | head -20
|
||||
|
||||
# === 2.3 数据库与缓存 ===
|
||||
echo ""
|
||||
echo "=== [4/8] PostgreSQL ==="
|
||||
docker exec -i wecom_it_postgres pg_isready -U postgres
|
||||
docker exec -i wecom_it_postgres psql -U postgres -d wecom_it_desk -c 'select version();' 2>&1 | head -5
|
||||
|
||||
echo ""
|
||||
echo "=== [5/8] Redis ==="
|
||||
docker exec -i wecom_it_redis redis-cli -a $(cat /run/secrets/redis_pw 2>/dev/null) ping 2>/dev/null || docker exec -i wecom_it_redis redis-cli ping
|
||||
|
||||
# === 2.4 资源使用 ===
|
||||
echo ""
|
||||
echo "=== [6/8] 磁盘 ==="
|
||||
df -h | grep -v tmpfs | head -20
|
||||
|
||||
echo ""
|
||||
echo "=== [7/8] 内存 ==="
|
||||
free -h
|
||||
|
||||
echo ""
|
||||
echo "=== [8/8] 日志大小 ==="
|
||||
du -sh /opt/wecom-it-desk/logs/* 2>/dev/null | sort -h | tail -20
|
||||
|
||||
# === 2.5 Nginx 状态 ===
|
||||
echo ""
|
||||
echo "=== [Nginx] 容器与首页 ==="
|
||||
docker ps --filter 'name=wecom_it_nginx' --format '{{.Names}} {{.Status}}'
|
||||
curl -sS -o /dev/null -w '员工端 / HTTP %{http_code}\n' http://127.0.0.1/
|
||||
curl -sS -o /dev/null -w '管理端 /itadmin/ HTTP %{http_code}\n' http://127.0.0.1/itadmin/
|
||||
curl -sS -o /dev/null -w '坐席端 /agent/ HTTP %{http_code}\n' http://127.0.0.1/agent/
|
||||
|
||||
echo ""
|
||||
echo "=== [end] ==="
|
||||
@@ -0,0 +1,34 @@
|
||||
import os, io
|
||||
|
||||
base = r"D:\资料\03-项目开发\wecom_it_smart_desk\docs"
|
||||
files = [
|
||||
os.path.join(base, "01-产品文档/04-坐席工作台/PRD-REQ-坐席-007-排查模板系统-v1.0.md"),
|
||||
os.path.join(base, "01-产品文档/04-坐席工作台/原型-REQ-坐席-007-排查模板系统-v1.0.html"),
|
||||
os.path.join(base, "02-技术文档/技术架构/技术方案-REQ-坐席-007-排查模板系统-v1.0.md"),
|
||||
os.path.join(base, "03-测试文档/03-功能测试用例/TC-坐席-007-排查模板系统.md"),
|
||||
]
|
||||
|
||||
# 有序替换:先长串后短串,避免 排查模板系统 被 排查模板 误伤
|
||||
content_repls = [
|
||||
("排查模板系统", "分诊排查系统"),
|
||||
("排查模板管理", "分诊排查管理"),
|
||||
("分诊模板", "分诊"),
|
||||
("排查模板", "排查"),
|
||||
]
|
||||
|
||||
for f in files:
|
||||
with io.open(f, "r", encoding="utf-8") as fh:
|
||||
txt = fh.read()
|
||||
counts = []
|
||||
for old, new in content_repls:
|
||||
c = txt.count(old)
|
||||
if c:
|
||||
txt = txt.replace(old, new)
|
||||
counts.append(f"{old}->{new}:{c}")
|
||||
with io.open(f, "w", encoding="utf-8") as fh:
|
||||
fh.write(txt)
|
||||
newname = f.replace("排查模板", "分诊排查")
|
||||
renamed = " (renamed)" if newname != f else ""
|
||||
if newname != f:
|
||||
os.rename(f, newname)
|
||||
print(os.path.basename(newname), "|", "; ".join(counts), renamed)
|
||||
@@ -0,0 +1,13 @@
|
||||
const ts = require('typescript');
|
||||
const fs = require('fs');
|
||||
|
||||
const path = process.argv[2];
|
||||
try {
|
||||
const src = fs.readFileSync(path, 'utf-8');
|
||||
const sourceFile = ts.createSourceFile(path, src, ts.ScriptTarget.Latest, true);
|
||||
// 检查顶层语句数量判断是否能 parse
|
||||
const stmtCount = sourceFile.statements ? sourceFile.statements.length : 0;
|
||||
console.log('[OK]', path.split(/[\\/]/).pop(), ':', stmtCount, 'top-level statements');
|
||||
} catch (e) {
|
||||
console.log('[FAIL]', e.message);
|
||||
}
|
||||
Reference in New Issue
Block a user