Compare commits
1 Commits
refactor/u
...
refactor/u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a75a3c2198 |
@@ -322,10 +322,19 @@ def run_compare(req: CompareRequest):
|
||||
|
||||
@app.get("/status")
|
||||
def get_status():
|
||||
"""各站登录态 + 数据态 + 入库态(前端状态盘用),另含 worker 就绪状态。"""
|
||||
"""各站登录态 + 数据态 + 入库态(前端状态盘用),另含 worker 就绪状态。
|
||||
|
||||
active_sites:本次会话实际挂载的站点(= ctx.sites_to_watch)。
|
||||
调试模式(config.yaml debug.enabled)下仅挂载 target_site,未挂载站点
|
||||
的 login_state 是 state.db 里上一会话的残留值,前端须以 active_sites 为准
|
||||
判定"在线",不能只看 login_state。
|
||||
"""
|
||||
ctx = worker_state.get("ctx")
|
||||
active_sites = list(ctx.sites_to_watch) if ctx is not None else []
|
||||
return {
|
||||
"worker_ready": worker_state["ready"],
|
||||
"worker_error": worker_state["error"],
|
||||
"active_sites": active_sites,
|
||||
"sites": state_store.get_all_status(),
|
||||
"ingest": state_store.get_all_ingest_state(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user