Class: Actions::Pulp3::OrphanCleanup::DeleteOrphanRepositoryVersions
- Inherits:
-
AbstractAsyncTask
- Object
- EntryAction
- Abstract
- AbstractAsyncTask
- Actions::Pulp3::OrphanCleanup::DeleteOrphanRepositoryVersions
- Defined in:
- app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb
Instance Method Summary collapse
Methods inherited from AbstractAsyncTask
#cancel, #cancel!, #combined_tasks, #done?, #external_task, #humanized_state, #new_or_existing_objects, #pulp_tasks, #rescue_external_task, #task_groups
Methods inherited from Abstract
Instance Method Details
#plan(smart_proxy) ⇒ Object
5 6 7 |
# File 'app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb', line 5 def plan(smart_proxy) plan_self(:smart_proxy_id => smart_proxy.id) end |
#rescue_strategy ⇒ Object
9 10 11 |
# File 'app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb', line 9 def rescue_strategy Dynflow::Action::Rescue::Skip end |
#run ⇒ Object
13 14 15 16 17 18 |
# File 'app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb', line 13 def run cleanup_outputs = ::Katello::Pulp3::SmartProxyRepository.instance_for_type(smart_proxy).delete_orphan_repository_versions output[:pulp_tasks] = cleanup_outputs[:pulp_tasks] output[:errors] = cleanup_outputs[:errors] fail ::Katello::Errors::OrphanCleanupRepoVersionDeleteError if output[:errors].any? end |