fix(shipping-notice): 收料回调路径契约改为 drop 根内文件名
- 修复跨机成功回调全程 400:Worker(Windows)与后端(Linux 挂载根)分属两机根路径不同,后端无法解析 Worker 本机绝对路径 - Worker 只上报文件名(output.name),后端按自身挂载的 drop 根拼接定位;历史载荷携带绝对路径亦按末段文件名兼容解析 - 同步收料 worker 路径契约注释与跨机路径回归测试
This commit is contained in:
1 parent
91a4bd538d
commit
4e97553f42
3 files changed
+40
-4
No files matched your search
@@ -584,12 +584,16 @@ def _write_mock_receipt_excel(path: Path) -> None:
|
||||
|
||||
|
||||
def _post_unit_ready(unit: dict[str, Any], output: Path) -> None:
|
||||
"""落盘成功后上报 receipt-batch-ready(归档);调用方须放在导出重试之外。"""
|
||||
"""落盘成功后上报 receipt-batch-ready(归档);调用方须放在导出重试之外。
|
||||
|
||||
file_path 契约为「drop 根内文件名」:Worker(Windows)与后端(Linux 挂载根)分属
|
||||
两机、根路径不同,后端按自身挂载根拼接定位(跨机部署下发本机绝对路径必 400)。
|
||||
"""
|
||||
_post_callback({
|
||||
'schema_version': 'shipping_receipt_rpa.v1',
|
||||
'callback_id': unit['callback_id'],
|
||||
'status': 'success',
|
||||
'file_path': str(output),
|
||||
'file_path': output.name,
|
||||
'original_filename': output.name,
|
||||
'sha256': hashlib.sha256(output.read_bytes()).hexdigest(),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user