fix: 运行状态与日志三处修复;依赖改用 uv 锁 + 国内镜像
- 重启标记不再污染新一轮运行:hydrate_runs() 标记「已中断」后立即落库,runtime.set_state() 在切入 discovering/studying 时清掉上一轮的 error/progress/finished_at - 服务重启后卡片「课程日志」能读到 SQLite 历史:前端兜底条件不再拿 status 是否为空做判断(重启后 status 恒为 interrupted) - 删除账号连带清日志:account_delete() 按账号 id + 用户名清 run_state/run_log/login_log,删除接口同时清内存里两个 key - 新增 uv.lock 依赖锁定;pyproject 走阿里云 PyPI 镜像,Dockerfile 支持 PIP_INDEX_URL 构建参数 - 文档移入 docs/,.gitignore 忽略 *.egg-info/(uv run 可编辑安装产物)
This commit is contained in:
+4
-2
@@ -234,8 +234,10 @@ export default function App() {
|
||||
response = await api<LogResponse>(`/api/log?key=${encodeURIComponent(id)}&since=0`)
|
||||
}
|
||||
let lines = response.lines || []
|
||||
// 服务重启后内存日志为空,退回读一次 SQLite 历史
|
||||
if (!lines.length && !response.status && !state.historyTried) {
|
||||
// 服务重启后内存日志为空,退回读一次 SQLite 历史。
|
||||
// 不能拿 status 当条件:重启会把上次的运行状态标成 interrupted,
|
||||
// status 非空但内存日志是空的,历史就永远读不出来。
|
||||
if (!lines.length && !state.historyTried) {
|
||||
state.historyTried = true
|
||||
try {
|
||||
const history = await api<{ lines?: string[] }>(
|
||||
|
||||
Reference in New Issue
Block a user