PgFlow.Migrations.Versions.V02 (PgFlow v0.1.2)

Copy Markdown View Source

PgFlow extensions migration version 2.

Replaces recover_stalled_tasks(double precision) with a step-aware implementation: it deadlines on each task's effective timeout (coalesce(step.opt_timeout, flow.opt_timeout)) plus a buffer, caps requeues at 3 (then archives the message and sets permanently_stalled_at), takes FOR UPDATE SKIP LOCKED, and skips tasks whose run has failed. See priv/pgflow_helpers/sql/versions/v02/v02_up.sql for the rationale and how it differs from upstream pgflow's requeue_stalled_tasks().

Summary

Functions

Rolls back this version's migration by executing the down SQL file.

Applies this version's migration by executing the up SQL file.

Functions

down(opts \\ [])

@spec down(keyword()) :: :ok

Rolls back this version's migration by executing the down SQL file.

up(opts \\ [])

@spec up(keyword()) :: :ok

Applies this version's migration by executing the up SQL file.