让免费层限流的报告跟真实限流一致,并给少一块结果的静默失败留下函数名和错误类型。
Co-Authored-By: Grok (agent loop)
This commit is contained in:
co-authored by
Grok (agent loop)
parent
e4ff62c738
commit
a7162db271
@@ -11,6 +11,7 @@ that profile, so it is not called.
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
import logging
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
@@ -34,6 +35,8 @@ except ModuleNotFoundError: # pragma: no cover - direct scripts/ execution
|
||||
render_pl9_parity_markdown,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
FULL_DATA_EDITION = "full_data"
|
||||
REPORT_VERSION_FULL = "pl9_personal_long_report.v4"
|
||||
FULL_DATA_DOMAINS = {
|
||||
@@ -1698,8 +1701,12 @@ def _render_pl9_ai_density_raw_data_markdown_en(packet: dict) -> str:
|
||||
chart_rows.append([chart_name, planet, item.get("sign"), item.get("house")])
|
||||
if chart_rows:
|
||||
lines.extend(["### Sudarshana Chakra Three-Reference Placements", "", table(["Reference chart", "Planet", "Sign", "House"], chart_rows), ""])
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.warning(
|
||||
"pl9_full_data_export._render_pl9_ai_density_raw_data_markdown_en degraded: %s",
|
||||
type(exc).__name__,
|
||||
)
|
||||
logger.debug("pl9_full_data_export._render_pl9_ai_density_raw_data_markdown_en degraded", exc_info=True)
|
||||
|
||||
d1_sheet = dict_get(("worksheets", "d1_rasi_bhava"), {})
|
||||
d1_houses = d1_sheet.get("houses") if isinstance(d1_sheet, dict) else {}
|
||||
@@ -2191,8 +2198,12 @@ def _render_pl9_ai_density_raw_data_markdown_zh(packet: dict) -> str:
|
||||
table(["参考盘", "行星", "星座", "宫位"], chart_rows),
|
||||
"",
|
||||
])
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.warning(
|
||||
"pl9_full_data_export._render_pl9_ai_density_raw_data_markdown_zh degraded: %s",
|
||||
type(exc).__name__,
|
||||
)
|
||||
logger.debug("pl9_full_data_export._render_pl9_ai_density_raw_data_markdown_zh degraded", exc_info=True)
|
||||
|
||||
text = "\n".join(line for line in lines if line is not None)
|
||||
text = re.sub(r"\n{3,}", "\n\n", text).strip() + "\n"
|
||||
|
||||
Reference in New Issue
Block a user