在前后端开发联调前 的提交20260223
This commit is contained in:
20
scripts/ops/analyze_v8_grep.py
Normal file
20
scripts/ops/analyze_v8_grep.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""查找 v8 日志中任务成功/完成的行。"""
|
||||
import json
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv(Path(__file__).resolve().parents[2] / ".env")
|
||||
from _env_paths import get_output_path
|
||||
|
||||
log_dir = get_output_path("SYSTEM_LOG_ROOT")
|
||||
raw = json.loads((log_dir / "2026-02-21__etl_run_raw_v8.json").read_text("utf-8"))
|
||||
|
||||
error_log = raw.get("error_log", "")
|
||||
output_log = raw.get("output_log", "")
|
||||
full = output_log + "\n" + error_log
|
||||
|
||||
# 查找包含 DWS_ 和 成功/完成/SUCCESS 的行
|
||||
for line in full.split("\n"):
|
||||
if ("DWS_" in line or "ODS_" in line or "DWD_" in line) and ("成功" in line or "完成" in line or "SUCCESS" in line):
|
||||
print(line.strip()[:200])
|
||||
Reference in New Issue
Block a user