Class: Actions::Pulp3::Repository::Sync
Instance Method Summary
collapse
#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
#check_error_details ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 25
def check_error_details
output[:pulp_tasks].each do |pulp_task|
error_details = pulp_task.try(:[], "error")
if error_details && !error_details.nil?
fail _("An error occurred during the sync \n%{error_message}") % {:error_message => error_details}
end
end
end
|
#external_task=(tasks) ⇒ Object
16
17
18
19
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 16
def external_task=(tasks)
output[:create_version] = true
super
end
|
#finalize ⇒ Object
21
22
23
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 21
def finalize
check_error_details
end
|
#invoke_external_task ⇒ Object
11
12
13
14
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 11
def invoke_external_task
repo = ::Katello::Repository.find(input[:repo_id])
output[:pulp_tasks] = repo.backend_service(::SmartProxy.unscoped.find(input[:smart_proxy_id])).sync(input[:options])
end
|
#plan(repo, smart_proxy, options = {}) ⇒ Object
7
8
9
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 7
def plan(repo, smart_proxy, options = {})
plan_self(:repo_id => repo.id, :smart_proxy_id => smart_proxy.id, :options => options)
end
|
#rescue_strategy_for_self ⇒ Object
46
47
48
49
50
51
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 46
def rescue_strategy_for_self
Dynflow::Action::Rescue::Skip
end
|
#run_progress ⇒ Object
34
35
36
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 34
def run_progress
presenter.progress
end
|
#run_progress_weight ⇒ Object
38
39
40
|
# File 'app/lib/actions/pulp3/repository/sync.rb', line 38
def run_progress_weight
10
end
|