|
@@ -84,7 +84,10 @@ def analysis_general_files(batch_code: str, type_codes: List[str]) -> Dict[str,
|
|
|
|
|
|
|
|
def fetch_minio_text(file_addr: str, timeout: int = 60) -> Optional[str]:
|
|
def fetch_minio_text(file_addr: str, timeout: int = 60) -> Optional[str]:
|
|
|
"""读取 MinIO 对象文本(CSV/JSON),供报告复用页面文件。"""
|
|
"""读取 MinIO 对象文本(CSV/JSON),供报告复用页面文件。"""
|
|
|
- url = f"{MINIO_ENDPOINT}/{MINIO_BUCKET}/{file_addr}"
|
|
|
|
|
|
|
+ key = file_addr
|
|
|
|
|
+ if key.startswith("/minio/"):
|
|
|
|
|
+ key = key[len("/minio/"):]
|
|
|
|
|
+ url = f"{MINIO_ENDPOINT}/{MINIO_BUCKET}/{key}"
|
|
|
try:
|
|
try:
|
|
|
r = requests.get(url, timeout=timeout)
|
|
r = requests.get(url, timeout=timeout)
|
|
|
r.raise_for_status()
|
|
r.raise_for_status()
|