feat(freight-rpa): 批次R解耦编排层并切换 onhand/inbound 契约

将 RPA 编排收编至 freight_rpa,回调迁 /api/freight-rpa/*。
共享目录与 Worker 契约一次切换至 onhand/inbound/upload,
并补 outbound 骨架与 tt16 排程 job key 迁移。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-17 23:18:48 +08:00
1 parent bf3154033b
commit ffc0d4a430
147 files changed
+4221 -2678

No files matched your search

+9 -1
View File
@@ -79,6 +79,14 @@ def create_app(config_name='default'):
_transfer_capabilities.register_transfer_capabilities()
# onhand/inbound RPA 回调 sink 注册(幂等):/api/freight-rpa/onhand-*、/api/freight-rpa/
# inbound-* 端点经 callback_sinks.dispatch_sink 分发到业务处理器;未注册的 kind 仍显式
# 404(FREIGHT_RPA.SINK_NOT_REGISTERED),不静默吞回调。
from app.services.shipping_notice.rpa_sinks import register_inbound_sinks, register_onhand_sinks
register_onhand_sinks()
register_inbound_sinks()
# 启动时强制加载一次,避免 worker 冷启动到首个请求之间仍用镜像默认值。
with app.app_context():
_apply_persisted_settings(app, force=True)
@@ -149,7 +157,7 @@ def create_app(config_name='default'):
# 负责(dev Wave 4),Web 进程不再兜底扫描。
# AUTO_UPLOAD 显式开启时启动级校验货代上传 RPA(仅告警,不阻断启动)。
try:
from app.services.shipping_notice.rpa_worker_heartbeat import (
from app.services.freight_rpa.common.worker_heartbeat import (
log_auto_upload_readiness_at_startup,
)
log_auto_upload_readiness_at_startup(app)