perf(fulfillment): Webhook 新订单即时选号
This commit is contained in:
@@ -107,8 +107,15 @@ async def sync_order_event(
|
||||
result = service.sync_order_item_ids(db, item_ids, commit=False)
|
||||
inbox.processed_at = datetime.now(UTC)
|
||||
db.commit()
|
||||
auto_allocator.wake_auto_allocator(result.get("taskIds", []))
|
||||
return {**result, "duplicate": False}
|
||||
task_ids = [
|
||||
int(task_id) for task_id in result.get("taskIds", []) if str(task_id).isdigit()
|
||||
]
|
||||
immediate = auto_allocator.run_immediate_allocation(db, task_ids=task_ids)
|
||||
return {
|
||||
**result,
|
||||
"duplicate": False,
|
||||
"immediateAllocation": immediate,
|
||||
}
|
||||
|
||||
|
||||
@router.post(
|
||||
|
||||
Reference in New Issue
Block a user