fix(fulfillment): 历史任务冻结,快照不再触发自动状态迁移
This commit is contained in:
@@ -21,6 +21,7 @@ from ..external_order_source import (
|
||||
)
|
||||
from .common import (
|
||||
AUTO_SYNC_INTERVAL_SECONDS,
|
||||
FLOW_VERSION_LEGACY,
|
||||
SCOPE_ELITE,
|
||||
TARGET_PLATFORM,
|
||||
_flow_version_for_order,
|
||||
@@ -158,6 +159,10 @@ def _upsert_order_snapshot(
|
||||
.first()
|
||||
)
|
||||
created = task is None
|
||||
if task is not None and task.flow_version == FLOW_VERSION_LEGACY:
|
||||
# 历史任务冻结:只保留来源快照,不参与任何自动状态迁移。
|
||||
task.source_snapshot_json = _jsonable(snapshot)
|
||||
return task, created, False
|
||||
if task is None:
|
||||
task = PlatformFulfillmentTask(
|
||||
source_system="order_site",
|
||||
|
||||
Reference in New Issue
Block a user