Class: Actions::Pulp3::AlternateContentSource::Refresh

Inherits:
Actions::Pulp3::AbstractAsyncTask show all
Defined in:
app/lib/actions/pulp3/alternate_content_source/refresh.rb

Instance Method Summary collapse

Methods inherited from Actions::Pulp3::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 Actions::Pulp3::Abstract

#smart_proxy

Instance Method Details

#invoke_external_taskObject



9
10
11
12
# File 'app/lib/actions/pulp3/alternate_content_source/refresh.rb', line 9

def invoke_external_task
  smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.find(input[:smart_proxy_acs_id])
  output[:response] = smart_proxy_acs.backend_service.refresh
end

#plan(smart_proxy_acs) ⇒ Object



5
6
7
# File 'app/lib/actions/pulp3/alternate_content_source/refresh.rb', line 5

def plan(smart_proxy_acs)
  plan_self(smart_proxy_id: smart_proxy_acs.smart_proxy_id, smart_proxy_acs_id: smart_proxy_acs.id)
end

#rescue_strategy_for_selfObject



14
15
16
17
18
19
# File 'app/lib/actions/pulp3/alternate_content_source/refresh.rb', line 14

def rescue_strategy_for_self
  # There are various reasons why refreshing fails, but not all of them are
  # fatal. When failing to refresh, we continue with the task ending up
  # in the warning state, but don't lock further refreshing
  Dynflow::Action::Rescue::Skip
end