Sha256: 1b775db69aece0d87d53506a943777197f468efc866ab11a5afe791f63e3f9a5

Contents?: true

Size: 764 Bytes

Versions: 3

Compression:

Stored size: 764 Bytes

Contents

module Actions
  module Pulp3
    module AlternateContentSource
      class Refresh < Pulp3::AbstractAsyncTask
        def plan(acs, smart_proxy)
          plan_self(acs_id: acs.id, smart_proxy_id: smart_proxy.id)
        end

        def invoke_external_task
          acs = ::Katello::AlternateContentSource.find(input[:acs_id])
          output[:response] = acs.backend_service(smart_proxy).refresh
        end

        def rescue_strategy_for_self
          # There are various reasons why refreshing fails, but not all of them are
          # fatal. When failing to refresh, we continue with the task ending up
          # in the warning state, but don't lock further refreshing
          Dynflow::Action::Rescue::Skip
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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