Sha256: 0ed6e88df8eadef925d22d1172d14f84b4f65e21cdd6b4613812282de36ffeaf

Contents?: true

Size: 1.18 KB

Versions: 61

Compression:

Stored size: 1.18 KB

Contents

namespace :katello do
  namespace :upgrades do
    namespace '3.13' do
      desc "Regenerate the metadata for repositories affected by pulp_deb migration 0004"
      task :republish_deb_metadata, [:input_file] => ["environment"] do |task, args|
        User.current = User.anonymous_api_admin
        input_file = args[:input_file] || "/var/lib/pulp/0004_deb_repo_republish_candidates.txt"
        if File.readable?(input_file)
          pulp_ids = File.read(input_file).each_line.map(&:strip) || []
          repos = Katello::Repository.where(:pulp_id => pulp_ids)
          puts _("Starting BulkMetadataGenerate task.")
          task = ForemanTasks.async_task(Actions::Katello::Repository::BulkMetadataGenerate, repos, :force => true)
          puts _("Please check that the task #{task.id} completes successfully.")
          puts _('You can manually re-trigger this task by running "foreman-rake katello:upgrades:3.13:republish_deb_metadata"')
        else
          puts _("Input file #{input_file} was not readable.")
          puts _('You can manually use an alternate input file by running "foreman-rake katello:upgrades:3.13:republish_deb_metadata[<path>]"')
        end
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
katello-3.18.5 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.4 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.3.1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.3 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-4.0.0.rc3 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.2.1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.2 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.17.3 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-4.0.0.rc2 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.1.1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.17.2 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-4.0.0.rc1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.0 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.17.1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.16.2 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.0.rc2.1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.0.rc2 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.17.0 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
katello-3.18.0.rc1 lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake