Sha256: c99ac2d48af70569574c3b71331e97d859edfff6231bd3a17c9f22f4ef20c059

Contents?: true

Size: 1.12 KB

Versions: 17

Compression:

Stored size: 1.12 KB

Contents

module Actions
  module Pulp
    module Consumer
      class SyncCapsule < ::Actions::Pulp::AbstractAsyncTask
        input_format do
          param :capsule_id, Integer
          param :repo_pulp_id, String
          param :sync_options
        end

        def plan(repository, smart_proxy, options)
          plan_self(:capsule_id => smart_proxy.id, :repo_pulp_id => repository.pulp_id, :sync_options => options)
        end

        def humanized_name
          _("Synchronize capsule content")
        end

        def invoke_external_task
          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

17 entries across 17 versions & 1 rubygems

Version Path
katello-3.17.3 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.2 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.2 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.0 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.18.0.rc1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.0.rc2.2 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.0.rc2.1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.1.2 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.1.1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.0.rc2 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.17.0.rc1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.0 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.0.rc5.1 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.0.rc5 app/lib/actions/pulp/consumer/sync_capsule.rb
katello-3.16.0.rc4.1 app/lib/actions/pulp/consumer/sync_capsule.rb