Sha256: d0fe1c1e7c6712c6a7129cb86b0a258fcfa25b43a5da147fe3100a01607d9c55
Contents?: true
Size: 1.13 KB
Versions: 6
Compression:
Stored size: 1.13 KB
Contents
namespace :katello do namespace :upgrades do namespace '3.8' do desc "Clear checksum type for on-demand repositories" task :clear_checksum_type => %w(environment) do User.current = User.anonymous_admin Katello::RootRepository.yum_type.find_each do |root_repo| root_repo.transaction do begin if root_repo.on_demand? && root_repo.url.present? root_repo.update_attribute(:checksum_type, nil) root_repo.repositories.each do |repo| begin repo.update_attribute(:saved_checksum_type, nil) if repo.find_distributor[:config]&.delete(:checksum_type) SmartProxy.pulp_master.pulp_api.resources.repository.update_distributor( repo.pulp_id, repo.find_distributor[:id], repo.find_distributor[:config]) end # rubocop:disable HandleExceptions rescue RestClient::ResourceNotFound end end end end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems