Sha256: 94690bbea057d4609bc106bb5481c91a294298a180196c29fcf201fb13aa77c9

Contents?: true

Size: 860 Bytes

Versions: 12

Compression:

Stored size: 860 Bytes

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
            action = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :contents_changed => options[:contents_changed])
            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).refresh_distributions
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
katello-3.14.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.4 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.14.0 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.3 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.14.0.rc2 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.2 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.14.0.rc1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.0 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.0.rc2.1 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.0.rc2 app/lib/actions/pulp3/repository/refresh_distribution.rb
katello-3.13.0.rc1 app/lib/actions/pulp3/repository/refresh_distribution.rb