Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
add idx_job_id for workflow run (#3655)
LawyZheng9cf603495262
diff --git a/alembic/versions/2025_10_09_0827-7cd6f55be8d2_add_job_id_idx.py b/alembic/versions/2025_10_09_0827-7cd6f55be8d2_add_job_id_idx.pynew file mode 100644index 000000000..7facda058--- /dev/null+++ b/alembic/versions/2025_10_09_0827-7cd6f55be8d2_add_job_id_idx.py@@ -0,0 +1,35 @@+"""add job id idx++Revision ID: 7cd6f55be8d2+Revises: 8d015c5358f8+Create Date: 2025-10-09 08:27:14.047236+00:00++"""++from typing import Sequence, Union++from alembic import op++# revision identifiers, used by Alembic.+revision: str = "7cd6f55be8d2"+down_revision: Union[str, None] = "8d015c5358f8"+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! ###+ with op.get_context().autocommit_block():+ op.execute("SET statement_timeout = '3h';")+ op.execute("""+ CREATE INDEX CONCURRENTLY IF NOT EXISTS ix_workflow_runs_job_id+ ON workflow_runs (job_id);+ """)+ # ### end Alembic commands ###+++def downgrade() -> None:+ # ### commands auto generated by Alembic - please adjust! ###+ with op.get_context().autocommit_block():+ op.execute("DROP INDEX IF EXISTS ix_workflow_runs_job_id;")+ # ### end Alembic commands ###diff --git a/skyvern/forge/sdk/db/models.py b/skyvern/forge/sdk/db/models.pyindex fc7107325..003b1fe21 100644--- a/skyvern/forge/sdk/db/models.py+++ b/skyvern/forge/sdk/db/models.py@@ -288,7 +288,7 @@ class WorkflowRunModel(Base):extra_http_headers = Column(JSON, nullable=True)browser_address = Column(String, nullable=True)script_run = Column(JSON, nullable=True)- job_id = Column(String, nullable=True)+ job_id = Column(String, nullable=True, index=True)depends_on_workflow_run_id = Column(String, nullable=True)sequential_key = Column(String, nullable=True)run_with = Column(String, nullable=True) # 'agent' or 'code'