Sha256: 584f76ad527a873b8ee0613a046380e73cbebd5f6cac1300bcf5e7cb15c8f8f6

Contents?: true

Size: 519 Bytes

Versions: 27

Compression:

Stored size: 519 Bytes

Contents

namespace :katello do
  task :delete_orphaned_content => ["environment"] do
    User.current = User.anonymous_admin
    SmartProxy.with_content.reverse.each do |proxy|
      begin
        ForemanTasks.async_task(Actions::Katello::CapsuleContent::RemoveOrphans,
                                :capsule_id => proxy.id)
      rescue RuntimeError => e
        Rails.logger.error "Smart proxy with ID #{proxy.id} may be down: #{e}"
      end
    end
    puts _("Orphaned content deletion started in background.")
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
katello-3.5.1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.5.0.1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.5.0 lib/katello/tasks/delete_orphaned_content.rake
katello-3.5.0.rc2 lib/katello/tasks/delete_orphaned_content.rake
katello-3.5.0.rc1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.4.5 lib/katello/tasks/delete_orphaned_content.rake
katello-3.4.4 lib/katello/tasks/delete_orphaned_content.rake