Sha256: 2dc25c5ae29b6c97c2445c95dcbd324d4de3707a490cc14cdf7b67c85aefe025

Contents?: true

Size: 1.17 KB

Versions: 80

Compression:

Stored size: 1.17 KB

Contents

module Actions
  module Pulp3
    module CapsuleContent
      class Sync < Pulp3::AbstractAsyncTask
        include ::Actions::Helpers::SmartProxySyncHistoryHelper
        def plan(repository, smart_proxy, options = {})
          sequence do
            sync_task = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :options => options)
            options[:sync_task_output] = sync_task.output[:pulp_tasks]
            plan_action(GenerateMetadata, repository, smart_proxy, options)
          end
        end

        def invoke_external_task
          repo = ::Katello::Repository.find(input[:repository_id])
          sync_options = {}
          sync_options[:optimize] = false if sync_options[:skip_metadata_check]
          output[:pulp_tasks] = repo.backend_service(smart_proxy).with_mirror_adapter.sync(sync_options)
        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

80 entries across 80 versions & 1 rubygems

Version Path
katello-4.4.0 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.4.0.rc2 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.4.0.rc1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.2 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.3.0 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.3.0.rc4 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.3.0.rc3 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.3.0.rc2.1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.3.0.rc2 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.3.0.rc1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.0.1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.1.4 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.0.1.rc3 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.0.1.rc2 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.0.rc2 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.1.3 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.2.0.rc1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.1.2.1 app/lib/actions/pulp3/capsule_content/sync.rb
katello-4.1.2 app/lib/actions/pulp3/capsule_content/sync.rb