Class: Katello::Events::ImportPool
- Inherits:
-
Object
- Object
- Katello::Events::ImportPool
- Defined in:
- app/models/katello/events/import_pool.rb
Constant Summary collapse
- EVENT_TYPE =
'import_pool'.freeze
Instance Method Summary collapse
-
#initialize(pool_id) ⇒ ImportPool
constructor
A new instance of ImportPool.
- #run ⇒ Object
Constructor Details
#initialize(pool_id) ⇒ ImportPool
Returns a new instance of ImportPool.
6 7 8 |
# File 'app/models/katello/events/import_pool.rb', line 6 def initialize(pool_id) @pool = ::Katello::Pool.find_by(:id => pool_id) end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 |
# File 'app/models/katello/events/import_pool.rb', line 10 def run @pool.try(:import_data) rescue RestClient::ResourceNotFound Rails.logger.warn "skipped re-index of non-existent pool #{@pool.cp_id}" end |