Sha256: d40135c52e6313f87c247f553ed2123979a4f0466c7e69d572d8f5757a036900

Contents?: true

Size: 519 Bytes

Versions: 11

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

11 entries across 11 versions & 1 rubygems

Version Path
katello-3.11.2 lib/katello/tasks/delete_orphaned_content.rake
katello-3.10.2 lib/katello/tasks/delete_orphaned_content.rake
katello-3.10.1.1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.10.1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.11.1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.11.0 lib/katello/tasks/delete_orphaned_content.rake
katello-3.11.0.rc2 lib/katello/tasks/delete_orphaned_content.rake
katello-3.11.0.rc1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.10.0 lib/katello/tasks/delete_orphaned_content.rake
katello-3.10.0.rc1.1 lib/katello/tasks/delete_orphaned_content.rake
katello-3.10.0.rc1 lib/katello/tasks/delete_orphaned_content.rake