feat: OCR 新增支持西班牙/意大利/加拿大(ES/IT/CA)
CI / test (pull_request) Failing after 1s

- api/ocr/models.py: SUPPORTED_COUNTRIES/_COUNTRY_MAP 补 CA/ES/IT 的 ISO 码与中文国名
- flows/label_ocr.py: label-ocr 默认国家列表扩为 8 国,docstring 同步
This commit is contained in:
yeuimu
2026-09-24 03:49:46 +00:00
parent 10d3c5f278
commit 2259bce7c4
2 changed files with 6 additions and 4 deletions
+3 -3
View File
@@ -137,12 +137,12 @@ def label_ocr(
courier_source: str | None = None,
days: int = 7,
) -> dict:
"""面单 OCR enrichment。默认处理英国+美国,近 7 天下单的订单。
"""面单 OCR enrichment。默认处理全部已支持国家(见 api.ocr.models.SUPPORTED_COUNTRIES),近 7 天下单的订单。
手动跑其他国家: label_ocr(country_regions=['德国'])
手动跑指定国家: label_ocr(country_regions=['德国'])
"""
if country_regions is None:
country_regions = ['英国', '美国', '墨西哥', '德国', '沙特']
country_regions = ['英国', '美国', '墨西哥', '德国', '沙特', '加拿大', '西班牙', '意大利']
if _has_running_peer():
print("已有 label-ocr 在运行,跳过本次")
return {"skipped": True}