add functionality to cache task_run (#1755)

This commit is contained in:
Shuchang Zheng
2025-02-11 14:47:41 +08:00
committed by GitHub
parent 8c43e6b70e
commit defd761e58
7 changed files with 127 additions and 18 deletions

View File

@@ -0,0 +1,29 @@
"""add task_run_org_run_id_index
Revision ID: b111f0f795bd
Revises: 60d0743274c9
Create Date: 2025-02-11 06:41:35.336836+00:00
"""
from typing import Sequence, Union
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "b111f0f795bd"
down_revision: Union[str, None] = "60d0743274c9"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_index("task_run_org_run_id_index", "task_runs", ["organization_id", "run_id"], unique=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index("task_run_org_run_id_index", table_name="task_runs")
# ### end Alembic commands ###