Class: Actions::Candlepin::Owner::ImportProducts

Inherits:
Abstract
  • Object
show all
Defined in:
app/lib/actions/candlepin/owner/import_products.rb

Instance Method Summary collapse

Instance Method Details

#runObject



9
10
11
12
13
14
15
16
17
# File 'app/lib/actions/candlepin/owner/import_products.rb', line 9

def run
  organization = ::Organization.find(input[:organization_id])
  ::Katello::Product.without_auditing do
    User.as_anonymous_admin do
      updated_content = organization.redhat_provider.import_products_from_cp.content_url_updated
      ForemanTasks.async_task(Katello::Repository::UpdateContentUrls, updated_content) if updated_content.present?
    end
  end
end