feat(server): expose ingest state in /status; doc auto-ingest in README
This commit is contained in:
@@ -137,6 +137,14 @@ inbound-verify
|
||||
[0] 退出
|
||||
```
|
||||
|
||||
### DB CLI(入库)
|
||||
|
||||
```bash
|
||||
# DB CLI:建库 / 初始化 / 灌数据 / 全流程 / 单站单类
|
||||
.venv/Scripts/python.exe -m inbound_verify.store createdb # 或 init | ingest | ingest-one <site> <kind> | all
|
||||
# 注:下载成功后会自动入库(postgres.auto_ingest,默认开);ingest-one 用于手动重灌指定站/类。
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 六、架构
|
||||
|
||||
@@ -188,11 +188,12 @@ def list_tasks(limit: int = 20):
|
||||
|
||||
@app.get("/status")
|
||||
def get_status():
|
||||
"""各站登录态 + 数据态(前端状态盘用),另含 worker 就绪状态。"""
|
||||
"""各站登录态 + 数据态 + 入库态(前端状态盘用),另含 worker 就绪状态。"""
|
||||
return {
|
||||
"worker_ready": worker_state["ready"],
|
||||
"worker_error": worker_state["error"],
|
||||
"sites": state_store.get_all_status(),
|
||||
"ingest": state_store.get_all_ingest_state(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user