Sha256: d93a9c4f38f47de86cb00efe86eab627308fa909578b62c74fd7b6459f5fe94e

Contents?: true

Size: 737 Bytes

Versions: 6

Compression:

Stored size: 737 Bytes

Contents

namespace :katello do
  namespace :upgrades do
    namespace '3.0' do
      task :update_subscription_facet_backend_data => ["environment"]  do
        User.current = User.anonymous_api_admin
        puts _("Updating backend data for subscription facets")

        Katello::Host::SubscriptionFacet.find_each do |subscription_facet|
          begin
            subscription_facet.update_from_consumer_attributes(subscription_facet.candlepin_consumer.consumer_attributes)
          rescue RestClient::Exception => exception
            Rails.logger.error exception
          end
          subscription_facet.host = ::Host::Managed.find(subscription_facet.host_id)
          subscription_facet.save!
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-3.0.0.rc7 lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake
katello-3.0.0.rc5 lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake
katello-3.0.0.rc4 lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake
katello-3.0.0.rc3 lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake
katello-3.0.0.rc2 lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake
katello-3.0.0.rc1 lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake