Class: Actions::Pulp3::Repository::Repair

Inherits:
AbstractAsyncTask show all
Includes:
Helpers::Presenter
Defined in:
app/lib/actions/pulp3/repository/repair.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, #run, #task_groups

Methods inherited from Abstract

#smart_proxy

Instance Method Details

#invoke_external_taskObject



10
11
12
13
# File 'app/lib/actions/pulp3/repository/repair.rb', line 10

def invoke_external_task
  repo = ::Katello::Repository.find(input[:repository_id])
  output[:response] = repo.backend_service(smart_proxy).repair(repo.version_href)
end

#plan(repository_id, smart_proxy = SmartProxy.pulp_primary) ⇒ Object



6
7
8
# File 'app/lib/actions/pulp3/repository/repair.rb', line 6

def plan(repository_id, smart_proxy = SmartProxy.pulp_primary)
  plan_self(:repository_id => repository_id, :smart_proxy_id => smart_proxy.id)
end

#presenterObject



23
24
25
# File 'app/lib/actions/pulp3/repository/repair.rb', line 23

def presenter
  Presenters::RepairPresenter.new(self)
end

#rescue_strategy_for_selfObject



27
28
29
# File 'app/lib/actions/pulp3/repository/repair.rb', line 27

def rescue_strategy_for_self
  Dynflow::Action::Rescue::Skip
end

#run_progressObject



15
16
17
# File 'app/lib/actions/pulp3/repository/repair.rb', line 15

def run_progress
  presenter.progress
end

#run_progress_weightObject



19
20
21
# File 'app/lib/actions/pulp3/repository/repair.rb', line 19

def run_progress_weight
  10
end