看板平均响应按协同分发统计;查价失败可从主账恢复;报价模板匹配与填表更稳,后台改名运营后台。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -118,15 +118,28 @@ class HttpLedger:
|
||||
facts: dict[str, str],
|
||||
business_line: str = "",
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
打主账查 TMS。查价可能慢于默认 10s:单独放宽,仍禁止无限等。
|
||||
|
||||
若仍超时,上层 query_tms_resilient 会回读主账:已 persistHit 有价则按成功续办。
|
||||
"""
|
||||
body: dict[str, Any] = {"work_order_no": work_order_no, "facts": facts}
|
||||
line = (business_line or str((facts or {}).get("业务线") or "")).strip()
|
||||
if line:
|
||||
body["businessLine"] = line
|
||||
out = self._post(
|
||||
"/inquiry/agent/tms/query",
|
||||
body,
|
||||
idem=f"tms:{work_order_no}",
|
||||
)
|
||||
# TMS 出站 + persistHit 常超过默认 10s,超时会被误判成接口异常。
|
||||
prev_timeout = self._client.timeout_seconds
|
||||
self._client.timeout_seconds = max(float(prev_timeout or 10), 45.0)
|
||||
self._client.close()
|
||||
try:
|
||||
out = self._post(
|
||||
"/inquiry/agent/tms/query",
|
||||
body,
|
||||
idem=f"tms:{work_order_no}",
|
||||
)
|
||||
finally:
|
||||
self._client.timeout_seconds = prev_timeout
|
||||
self._client.close()
|
||||
if "classification" not in out and not out.get("ok"):
|
||||
return {
|
||||
"ok": False,
|
||||
|
||||
Reference in New Issue
Block a user