feat(shipping-notice): 完善发货通知自动推进与多库存源复核闭环
This commit is contained in:
1 parent
cfa19a0b7b
commit
8e0bbf7a81
180 files changed
+31210
-1864
No files matched your search
@@ -387,6 +387,11 @@ def enqueue(
|
||||
commit: bool = True,
|
||||
correlation_id: str | None = None,
|
||||
scheduled_at: Any = None,
|
||||
task_id: int | None = None,
|
||||
execution_id: int | None = None,
|
||||
gate_id: int | None = None,
|
||||
candidate_set_id: int | None = None,
|
||||
fencing_token: str | None = None,
|
||||
) -> int:
|
||||
"""
|
||||
将任务写入通用 jobs 队列并返回 job id。
|
||||
@@ -411,6 +416,9 @@ def enqueue(
|
||||
commit: False 时仅 flush,由调用方与业务行同一事务提交。
|
||||
correlation_id: 兼容旧接口;business_ref 为空时作为业务锚点。
|
||||
scheduled_at: 未来时间则延迟到该时间后才可被 worker 领取。
|
||||
task_id / execution_id / gate_id / candidate_set_id: 正式业务作用域;AutoProgress
|
||||
使用这些列实施 Task 级活动唯一与版本围栏。
|
||||
fencing_token: Worker 领取前写入的代次围栏;迟到副作用必须比对。
|
||||
"""
|
||||
normalized_type = _normalize_job_type(job_type)
|
||||
if normalized_type in {JobType.KB_CLEAN.value, JobType.KB_DIFY_SYNC.value}:
|
||||
@@ -464,6 +472,11 @@ def enqueue(
|
||||
attempts=0,
|
||||
max_attempts=max(1, int(max_attempts or 1)),
|
||||
created_by_id=created_by_id,
|
||||
task_id=task_id,
|
||||
execution_id=execution_id,
|
||||
gate_id=gate_id,
|
||||
candidate_set_id=candidate_set_id,
|
||||
fencing_token=fencing_token,
|
||||
created_at=queue_at,
|
||||
updated_at=now,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user