PgFlowDashboard.Queries.Jobs (PgFlow v0.1.0)

Copy Markdown View Source

Database queries for job-related data.

Summary

Functions

Counts all jobs.

Gets a job's statistics.

Gets run history data for a job's activity grid.

Lists jobs with statistics.

Functions

count_jobs(repo)

@spec count_jobs(module()) :: integer()

Counts all jobs.

get_job(repo, flow_slug)

@spec get_job(module(), String.t()) :: {:ok, map()} | {:error, :not_found | term()}

Gets a job's statistics.

get_run_history_grid(repo, flow_slug, opts \\ [])

@spec get_run_history_grid(module(), String.t(), keyword()) :: [map()]

Gets run history data for a job's activity grid.

Returns a list of run result cells for the single job step.

list_jobs(repo, opts \\ [])

@spec list_jobs(
  module(),
  keyword()
) :: [map()]

Lists jobs with statistics.

Options

  • :limit - Maximum number of jobs to return
  • :cursor - Cursor for pagination (flow_slug to start after)