Lightning.Workflows.Query (Lightning v2.13.3)
View SourceQuery 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
@spec enabled_cron_jobs_by_edge() :: Ecto.Queryable.t()
Returns active jobs with their cron triggers for use in the cron scheduling service.
@spec jobs_for(Lightning.Accounts.User.t()) :: Ecto.Queryable.t()
@spec jobs_for(Lightning.Projects.Project.t()) :: Ecto.Queryable.t()
Returns all jobs accessible to a user, via their projects or all jobs in a given project.
@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