fix(fulfillment): 主动补全有效 CK 商品能力缓存
This commit is contained in:
@@ -549,6 +549,10 @@
|
||||
"20261128_0137_platform_fulfillment_outbox_state_hash.py": {
|
||||
"revision": "20261128_0137",
|
||||
"sha256": "a1ac06c57eacf11d12d75ec7a6bc9099fcafd33d6119ecdb94fd17abe99dc660"
|
||||
},
|
||||
"20261128_0138_account_sync_backfill_cadence.py": {
|
||||
"revision": "20261128_0138",
|
||||
"sha256": "12b7cc588be5da8009e8c7090087ed4ad1d5a3723b2fe8e97584208550feced4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
"""raise account sync queue throughput for capability backfill
|
||||
|
||||
Revision ID: 20261128_0138
|
||||
Revises: 20261128_0137
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "20261128_0138"
|
||||
down_revision: str | None = "20261128_0137"
|
||||
branch_labels: str | None = None
|
||||
depends_on: str | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Set the default sync batch to 40 without overriding custom values."""
|
||||
if not sa.inspect(op.get_bind()).has_table("automation_jobs"):
|
||||
return
|
||||
op.execute(
|
||||
sa.text(
|
||||
"""
|
||||
UPDATE automation_jobs
|
||||
SET batch_size = 40,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
WHERE `key` = 'account_sync_queue'
|
||||
AND batch_size = 20
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Do not reduce throughput when older code is rolled back."""
|
||||
return
|
||||
Reference in New Issue
Block a user