Sha256: 5e5acf8454eaa3fc03f8f4807ea118e5ae519fc2dbf06bd6562e69aeddc17baf

Contents?: true

Size: 591 Bytes

Versions: 10

Compression:

Stored size: 591 Bytes

Contents

module Katello
  class Event < Katello::Model
    validate :validate_event_type
    # NOTE: Do not use active record call backs or dependent references on this class
    # Direct deletes are made in EventQueue#clear_events (instead of destroys).

    serialize :metadata, Hash

    def validate_event_type
      unless EventQueue.supported_event_types.include?(self.event_type)
        errors.add(:event_type, _("Unsupported event type %{type}. Supported: %{types}") %
            {:type => self.event_type, :types => EventQueue.supported_event_types.join(',')})
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katello-4.14.2 app/models/katello/event.rb
katello-4.15.0 app/models/katello/event.rb
katello-4.15.0.rc2 app/models/katello/event.rb
katello-4.15.0.rc1 app/models/katello/event.rb
katello-4.14.1 app/models/katello/event.rb
katello-4.14.0 app/models/katello/event.rb
katello-4.14.0.rc3 app/models/katello/event.rb
katello-4.14.0.rc2 app/models/katello/event.rb
katello-4.14.0.rc1.1 app/models/katello/event.rb
katello-4.14.0.rc1 app/models/katello/event.rb