perf(fulfillment): Webhook 新订单即时选号
This commit is contained in:
@@ -99,10 +99,14 @@ def sync_tasks(
|
||||
current: User = Depends(require_permission("platform_fulfillment:use")),
|
||||
) -> dict[str, Any]:
|
||||
result = service.sync_pending_tasks(db, limit=limit)
|
||||
if result.get("taskIds"):
|
||||
from ..services.platform_fulfillment.auto_allocator import wake_auto_allocator
|
||||
from ..services.platform_fulfillment.auto_allocator import (
|
||||
run_immediate_allocation,
|
||||
)
|
||||
|
||||
wake_auto_allocator(result["taskIds"])
|
||||
result["immediateAllocation"] = run_immediate_allocation(
|
||||
db,
|
||||
task_ids=result.get("taskIds", []),
|
||||
)
|
||||
record_audit(
|
||||
db,
|
||||
current,
|
||||
|
||||
Reference in New Issue
Block a user