Class: Actions::Pulp3::CapsuleContent::RefreshDistribution

Inherits:
AbstractAsyncTask show all
Includes:
Helpers::Presenter
Defined in:
app/lib/actions/pulp3/capsule_content/refresh_distribution.rb

Instance Method Summary collapse

Methods included from Helpers::Presenter

#presenter

Methods inherited from AbstractAsyncTask

#cancel, #cancel!, #combined_tasks, #done?, #external_task, #humanized_state, #new_or_existing_objects, #pulp_tasks, #rescue_external_task, #run, #task_groups

Methods inherited from Abstract

#smart_proxy

Instance Method Details

#invoke_external_taskObject



14
15
16
17
18
# File 'app/lib/actions/pulp3/capsule_content/refresh_distribution.rb', line 14

def invoke_external_task
  smart_proxy = ::SmartProxy.unscoped.find(input[:smart_proxy_id])
  repo = ::Katello::Repository.find(input[:repository_id])
  repo.backend_service(smart_proxy).with_mirror_adapter.refresh_distributions
end

#plan(repository, smart_proxy, options = {}) ⇒ Object



8
9
10
11
12
# File 'app/lib/actions/pulp3/capsule_content/refresh_distribution.rb', line 8

def plan(repository, smart_proxy, options = {})
  plan_self(:repository_id => repository.id,
                     :smart_proxy_id => smart_proxy.id,
                     :options => options)
end