Skip to main content

list_schedules

Function list_schedules 

Source
pub async fn list_schedules(
    pool: &Pool,
    hierarchies: &[String],
    oneshot_only: bool,
    interval_only: bool,
    pending_only: bool,
    exhausted_only: bool,
    after_id: Option<i64>,
    count: Option<u64>,
) -> Result<Vec<ListedSchedule>, Error>
Expand description

List schedules matching the supplied filters. Only the newest version of each (name, aih) is visible; readiness derives from each row’s newest tasks_runs entry. Every filter is optional and composes additively — the SQL is one statement that gates each predicate on whether the corresponding bind is active (0 = inactive bool flag, NULL = unset after_id/count).

  • hierarchies: exact-match AIH scope (no subtree descent).
  • oneshot_only / interval_only: kind filter (mutually exclusive at the CLI layer; both false = no kind filter).
  • pending_only / exhausted_only: readiness filter (same).
  • after_id / count: keyset pagination by ascending row id. count = None binds NULL to LIMIT for unlimited.