优化直播控制台:引入进程监控轻量轮询,并拆分 Live UI 组件
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -183,9 +183,6 @@ def summarize_process_activity(
|
||||
elif family == "youtube" and has_ffmpeg_worker and _looks_like_ffmpeg_starting(tail) and log_recent:
|
||||
business_status = "relay_starting"
|
||||
business_note = "FFmpeg 已启动,尚未观察到视频进度"
|
||||
elif log_age_seconds is not None and log_age_seconds > 180:
|
||||
business_status = "stale"
|
||||
business_note = f"进程在线但日志 {int(log_age_seconds)} 秒未更新"
|
||||
elif family == "youtube" and _has_any(
|
||||
tail,
|
||||
("等待直播", "循环等待", "检测直播间中", "没有正在监测的直播", "无录制任务", "网址内容获取失败"),
|
||||
@@ -198,6 +195,11 @@ def summarize_process_activity(
|
||||
):
|
||||
business_status = "source_live"
|
||||
business_note = "源站已开播,但暂未检测到 FFmpeg 推流"
|
||||
elif log_age_seconds is not None and log_age_seconds > 180 and (
|
||||
has_ffmpeg_worker or has_recent_ffmpeg_progress or _looks_like_ffmpeg_progress(tail)
|
||||
):
|
||||
business_status = "stale"
|
||||
business_note = f"进程在线但日志 {int(log_age_seconds)} 秒未更新"
|
||||
elif "traceback" in tail or " error " in tail or "[error]" in tail or "错误信息" in tail:
|
||||
business_status = "error"
|
||||
business_note = "近期日志中出现异常"
|
||||
|
||||
Reference in New Issue
Block a user