Sha256: b7f6aa62b27f7847155a4fae5ea9692b827846cc18a7a1d11bff9f86352f2ef4

Contents?: true

Size: 722 Bytes

Versions: 3

Compression:

Stored size: 722 Bytes

Contents

module Actions
  module Katello
    module AlternateContentSource
      class Refresh < Actions::EntryAction
        def plan(acs)
          action_subject(acs)
          concurrence do
            acs.smart_proxies.each do |smart_proxy|
              plan_action(Pulp3::Orchestration::AlternateContentSource::Refresh,
                          acs, smart_proxy)
            end
          end
          plan_self(acs_id: acs.id)
        end

        def finalize
          acs = ::Katello::AlternateContentSource.find_by(id: input[:acs_id])
          acs.update(last_refreshed: ::DateTime.now)
        end

        def humanized_name
          _("Refresh Alternate Content Source")
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katello-4.5.1 app/lib/actions/katello/alternate_content_source/refresh.rb
katello-4.5.0 app/lib/actions/katello/alternate_content_source/refresh.rb
katello-4.5.0.rc2 app/lib/actions/katello/alternate_content_source/refresh.rb