belongs_to :pipeline_template, :foreign_key => :pipeline_template_uuid, :primary_key => :uuid
before_validation :bootstrap_components
- before_validation :update_success
+ before_validation :update_state
before_validation :verify_status
before_create :set_state_before_save
before_save :set_state_before_save
t.add :properties
t.add :state
t.add :components_summary
+ t.add :description
+ t.add :started_at
+ t.add :finished_at
end
# Supported states for a pipeline instance
else
row << 0.0
if step['failed']
- self.success = false
+ self.state = Failed
end
end
row << (step['warehousejob']['id'] rescue nil)
end
end
- def update_success
+ def update_state
if components and progress_ratio == 1.0
- self.success = true
+ self.state = Complete
end
end
end
def set_state_before_save
- if self.components_look_ready? && (!self.state || self.state == New)
- self.state = Ready
- end
+ if self.components_look_ready? && (!self.state || self.state == New)
+ self.state = Ready
+ end
end
end