Sha256: 93cd33427640e8a642df15ee934d395998dd0fc792bd6bb76eb2d0a9e4c35e12
Contents?: true
Size: 1.24 KB
Versions: 47
Compression:
Stored size: 1.24 KB
Contents
module Actions module Pulp3 module CapsuleContent class RefreshDistribution < Pulp3::AbstractAsyncTask include Helpers::Presenter middleware.use Actions::Middleware::ExecuteIfContentsChanged def plan(repository, smart_proxy, options = {}) plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :options => options) end def run smart_proxy = ::SmartProxy.unscoped.find(input[:smart_proxy_id]) options = input[:options] tasks = options[:tasks] repo = ::Katello::Repository.find(input[:repository_id]) if options[:use_repository_version] output[:response] = repo.backend_service(smart_proxy).with_mirror_adapter.refresh_distributions(:use_repository_version => true) elsif tasks && tasks[:pulp_tasks] && tasks[:pulp_tasks].first publication_href = tasks[:pulp_tasks].first[:created_resources].first if publication_href output[:response] = repo.backend_service(smart_proxy).with_mirror_adapter.refresh_distributions(:publication => publication_href) end end end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems