Lightning.Workflows.Query (Lightning v2.13.3)

View Source

Query module for finding Jobs.

Summary

Functions

Returns active jobs with their cron triggers for use in the cron scheduling service.

Returns all jobs accessible to a user, via their projects or all jobs in a given project.

Returns snapshots that are no longer being used by any workflow, work order, run, or step.

Functions

enabled_cron_jobs_by_edge()

@spec enabled_cron_jobs_by_edge() :: Ecto.Queryable.t()

Returns active jobs with their cron triggers for use in the cron scheduling service.

jobs_for(user)

Returns all jobs accessible to a user, via their projects or all jobs in a given project.

unused_snapshots()

@spec unused_snapshots() :: Ecto.Queryable.t()

Returns snapshots that are no longer being used by any workflow, work order, run, or step.

A snapshot is considered unused if:

  • It's not the current version of any workflow (lock_version doesn't match workflow's lock_version)
  • It's not referenced by any work order
  • It's not referenced by any run
  • It's not referenced by any step