让免费层限流的报告跟真实限流一致,并给少一块结果的静默失败留下函数名和错误类型。
Co-Authored-By: Grok (agent loop)
This commit is contained in:
co-authored by
Grok (agent loop)
parent
e4ff62c738
commit
a7162db271
@@ -4,6 +4,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from functools import lru_cache
|
||||
@@ -14,6 +15,8 @@ SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
if str(SCRIPT_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(SCRIPT_DIR))
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from scripts.domain_calculation_service import compute_chart, compute_transit_longitude, compute_vimshottari_timeline
|
||||
from scripts.timing_precision_contract import build_timing_precision_contract
|
||||
@@ -253,9 +256,11 @@ def _case_chart(case_id: str, year: int, month: int, day: int, hour: int, minute
|
||||
try:
|
||||
return compute_chart({
|
||||
"year": year, "month": month, "day": day, "hour": hour, "minute": minute,
|
||||
"lat": lat, "lon": lon, "tz": tz, "ayanamsa": "lahiri", "node_mode": node_mode,
|
||||
"lat": lat, "lon": lon, "tz": tz, "ayanamsa": "lahiri", "node_mode": node_mode,
|
||||
})
|
||||
except Exception:
|
||||
except Exception as exc:
|
||||
logger.warning("reference_transparency_contract._case_chart degraded: %s", type(exc).__name__)
|
||||
logger.debug("reference_transparency_contract._case_chart degraded", exc_info=True)
|
||||
return None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user