Class: Actions::Pulp3::ContentViewVersion::CreateImport

Inherits:
AbstractAsyncTask show all
Defined in:
app/lib/actions/pulp3/content_view_version/create_import.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



13
14
15
16
17
18
19
20
21
# File 'app/lib/actions/pulp3/content_view_version/create_import.rb', line 13

def invoke_external_task
   = ::Katello::Pulp3::ContentViewVersion::MetadataMap.new(metadata: input[:metadata])
  output[:pulp_tasks] = ::Katello::Pulp3::ContentViewVersion::Import.new(
    organization: ::Organization.find(input[:organization_id]),
    smart_proxy: smart_proxy,
    path: input[:path],
    metadata_map: 
  ).create_import(input[:importer_data][:pulp_href])
end

#rescue_strategy_for_selfObject



23
24
25
26
27
28
# File 'app/lib/actions/pulp3/content_view_version/create_import.rb', line 23

def rescue_strategy_for_self
  # There are various reasons the importing fails, not all of them are
  # fatal: when fail on import, we continue with the task ending up
  # in the warning state, but not locking further imports
  Dynflow::Action::Rescue::Skip
end