Sha256: 84e962ddee53bd424b6664025d33a685643ad5de0fdbb807fdf3b6bd9002fe36

Contents?: true

Size: 1.02 KB

Versions: 13

Compression:

Stored size: 1.02 KB

Contents

module Actions
  module Pulp3
    module Repository
      class RefreshDistribution < Pulp3::AbstractAsyncTask
        include Helpers::Presenter
        middleware.use Actions::Middleware::ExecuteIfContentsChanged

        def plan(repository, smart_proxy, options = {})
          sequence do
            options = {:repository_id => repository.id, :smart_proxy_id => smart_proxy.id}
            options[:contents_changed] if options.key?(:contents_changed)
            plan_action(::Actions::Pulp3::ContentGuard::Refresh, smart_proxy) unless repository.unprotected
            action = plan_self(options)
            plan_action(SaveDistributionReferences, repository, smart_proxy,
                        action.output, :contents_changed => options[:contents_changed])
          end
        end

        def invoke_external_task
          repo = ::Katello::Repository.find(input[:repository_id])
          output[:response] = repo.backend_service(smart_proxy).with_mirror_adapter.refresh_distributions
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
katello-3.16.2 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.1.2 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.1.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.17.0.rc1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc5.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc5 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc4.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc4 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc3.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc3 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.16.0.rc2.1 app/lib/actions/pulp3/repository/refresh_distribution.rb