Sha256: efc294a7e3b80c995c0207f6ad69241382f805dbef3610a09dccecf735949e5d
Contents?: true
Size: 1.27 KB
Versions: 75
Compression:
Stored size: 1.27 KB
Contents
module Actions module Pulp module Consumer class SyncCapsule < ::Actions::Pulp::AbstractAsyncTask include ::Actions::Helpers::SmartProxySyncHistoryHelper input_format do param :capsule_id, Integer param :repo_pulp_id, String param :repository_id, Integer param :sync_options end def plan(repository, smart_proxy, options) plan_self(:capsule_id => smart_proxy.id, :repo_pulp_id => repository.pulp_id, :repository_id => repository.id, :sync_options => options) end def humanized_name _("Synchronize capsule content") end def invoke_external_task output[:pulp_tasks] = pulp_resources.repository.sync(input[:repo_pulp_id], override_config: input[:sync_options]) end def run_progress # override this method so this task's progress isn't 0.5 # when it is initiated, skewing the progress bar progress self.done? ? 1 : 0.1 end def rescue_strategy_for_self if output[:cancelled] Dynflow::Action::Rescue::Fail else Dynflow::Action::Rescue::Skip end end def run_progress_weight 100 end end end end end
Version data entries
75 entries across 75 versions & 1 rubygems