class MaintenanceStep
One step in a maintenance plan’s chain, with its own cadence override and per-step configuration.
Constants
- SNAPSHOT_IDS_PATTERN
-
Snapshot ids are interpolated into ARRAY unquoted, so they must be integers only - never SQL.
- THRESHOLD_PATTERN
-
A duration/threshold magnitude plus a unit, e.g. “7d”, “128MB”, “1.5GB”. Shared with the engine config’s retention floors, which are compared against these values.
- WHERE_PREDICATE_PATTERN
-
WHERE predicates are interpolated verbatim into ALTER TABLE … EXECUTE statements. This allows common SQL predicate syntax (comparisons, boolean operators, parentheses, column refs, string/numeric literals) while rejecting stacked queries, DDL, and comment-based injection.
- WHERE_SQL_COMMENTS
Public Instance Methods
Source
# File app/models/maintenance_step.rb, line 15 def due_at?(time) return true if cadence_cron.blank? parsed = Fugit::Cron.parse(cadence_cron) return true if parsed.nil? parsed.match?(time.change(sec: 0, usec: 0)) end
Due at this dispatch?
Without cadence_cron it always runs - the step follows the plan’s rhythm. With cadence_cron it runs when the cron matches the dispatch instant.