class ExecutionHistory
One run of a maintenance plan against a table. Tracks status, timing, retries, and the individual chain steps executed.
Constants
- STATUSES
- STEPS
-
STEPSkept for the legacy step-chain rendering; current_step now holds the name of the chain step in flight (an operation) or a lifecycle label.
Public Instance Methods
Source
# File app/models/execution_history.rb, line 43 def current_step_started_at execution_steps.select { |s| s.status == "running" }.first&.started_at end
Started_at of the chain step currently in flight, if any.
Source
# File app/models/execution_history.rb, line 54 def duration return nil if started_at.nil? || finished_at.nil? finished_at - started_at end
Wall-clock duration of the execution, when both start and end are known. @return [Float, nil]
Source
# File app/models/execution_history.rb, line 24 def failed? status == "failed" end
Whether the execution ended in failure. @return [Boolean]
Source
# File app/models/execution_history.rb, line 30 def finished? %w[success failed skipped].include?(status) end
Whether the execution has reached a terminal state. @return [Boolean]
Source
# File app/models/execution_history.rb, line 38 def retrying? status == "running" && retry_count.positive? end
Whether the execution is running while a dispatch retry is still in flight. retry_count here counts pending-dispatch retries only; commit-conflict retries are per-step and live on ExecutionStep#retry_count. @return [Boolean]
Source
# File app/models/execution_history.rb, line 48 def waiting_reason TableLock.exists?(iceberg_table_id: iceberg_table_id) ? :lock : :engine end
Why a queued execution is not running yet.