Sha256: a9b1c94bd51d115acdf1ebbcc3875ab7958746f88be285a945211c20862537cf

Contents?: true

Size: 715 Bytes

Versions: 137

Compression:

Stored size: 715 Bytes

Contents

module Actions
  module Candlepin
    class AsyncHypervisors < Candlepin::AbstractAsyncTask
      # this action is for tracking an async candlepin task when the task id is already known
      input_format do
        param :task_id
      end

      def poll_external_task(task_id = external_task[:id])
        task = ::Katello::Resources::Candlepin::Job.get(task_id, :result_data => true)
        unless ::Katello::Resources::Candlepin::Job.not_finished?(task)
          output[:hypervisors] = ::Actions::Katello::Host::Hypervisors.parse_hypervisors(task.delete('resultData'))
        end
        task
      end

      def invoke_external_task
        poll_external_task(input[:task_id])
      end
    end
  end
end

Version data entries

137 entries across 137 versions & 1 rubygems

Version Path
katello-3.17.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.18.0.rc2.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.18.0.rc2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.17.0 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.18.0.rc1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.17.0.rc2.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.17.0.rc2.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.1.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.1.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.17.0.rc2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.17.0.rc1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.0 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.0.rc5.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.0.rc5 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.0.rc4.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.15.3.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.15.3 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.16.0.rc4 app/lib/actions/candlepin/async_hypervisors.rb