Sha256: 35118236f9713c601fe54f9a169272454bc74f8374eb0c7c6c9cb45653bddf69

Contents?: true

Size: 836 Bytes

Versions: 52

Compression:

Stored size: 836 Bytes

Contents

module Actions
  module Pulp3
    module AlternateContentSource
      class Refresh < Pulp3::AbstractAsyncTask
        def plan(smart_proxy_acs)
          plan_self(smart_proxy_id: smart_proxy_acs.smart_proxy_id, smart_proxy_acs_id: smart_proxy_acs.id)
        end

        def invoke_external_task
          smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.find(input[:smart_proxy_acs_id])
          output[:response] = smart_proxy_acs.backend_service.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

52 entries across 52 versions & 1 rubygems

Version Path
katello-4.11.0.rc2 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.11.0.rc1 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.10.0 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.9.2 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.10.0.rc2 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.10.0.rc1 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.4 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.9.1 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.3 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.9.0 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.7.6 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.2 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.9.0.rc2 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.9.0.rc1 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.1 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.7.5 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.0 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.0.rc2 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.7.4 app/lib/actions/pulp3/alternate_content_source/refresh.rb
katello-4.8.0.rc1 app/lib/actions/pulp3/alternate_content_source/refresh.rb