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-4.2.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.2.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.2.0.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.1.4 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.0.3 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.2.0.1.rc3 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.18.5 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.2.0.1.rc2 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.2.0.rc2 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.1.3 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.2.0.rc1 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.0.2.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.1.2.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.0.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.1.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.18.4 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.1.1 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.1.0 app/lib/actions/candlepin/async_hypervisors.rb
katello-4.0.1.2 app/lib/actions/candlepin/async_hypervisors.rb
katello-3.18.3.1 app/lib/actions/candlepin/async_hypervisors.rb