lib/katello/tasks/pulp3_migration_abort.rake in katello-3.18.3.1 vs lib/katello/tasks/pulp3_migration_abort.rake in katello-3.18.4

- old
+ new

@@ -15,8 +15,14 @@ cancelled_task = true end cancelled_tasks_count += 1 if cancelled_task end + api = Katello::Pulp3::Api::Core.new(SmartProxy.pulp_primary) + api.tasks_api.list(:state__in => 'running,waiting', :name => 'pulp_2to3_migration.app.migration.complex_repo_migration').results.each do |task| + api.cancel_task(task.pulp_href) + cancelled_tasks_count += 1 + end + puts _("\e[33mCancelled #{cancelled_tasks_count} tasks.\e[0m") end end