Sha256: f46a7f57db4443bf3885d44112697b4a5f671d03c4cf9cbd329c71656521ce5c

Contents?: true

Size: 957 Bytes

Versions: 4

Compression:

Stored size: 957 Bytes

Contents

module Actions
  module Pulp3
    module CapsuleContent
      class Sync < Pulp3::AbstractAsyncTask
        def plan(repository, smart_proxy, options = {})
          sequence do
            plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :options => options)
            plan_action(GenerateMetadata, repository, smart_proxy, options)
          end
        end

        def invoke_external_task
          repo = ::Katello::Repository.find(input[:repository_id])
          output[:pulp_tasks] = repo.backend_service(::SmartProxy.unscoped.find(input[:smart_proxy_id])).sync_mirror
        end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
katello-3.14.1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-3.14.0 app/lib/actions/pulp3/capsule_content/sync.rb
katello-3.14.0.rc2 app/lib/actions/pulp3/capsule_content/sync.rb
katello-3.14.0.rc1 app/lib/actions/pulp3/capsule_content/sync.rb