Sha256: de93873459f68df41731c6bfafaf585ccb31b138679452edec41c3a5d21c9ae2
Contents?: true
Size: 914 Bytes
Versions: 23
Compression:
Stored size: 914 Bytes
Contents
module Actions module Katello module Host class GenerateApplicability < Actions::Base def queue ::Katello::HOST_TASKS_QUEUE end def plan(hosts, use_queue = true) uuids = hosts.map { |host| host.content_facet.try(:uuid) }.compact unless uuids.empty? plan_action(Pulp::Consumer::GenerateApplicability, :uuids => uuids) plan_self(:host_ids => hosts.map(&:id), :use_queue => use_queue) end end def finalize input[:host_ids].each do |host_id| if input[:use_queue] ::Katello::EventQueue.push_event(::Katello::Events::ImportHostApplicability::EVENT_TYPE, host_id) else host = ::Host.find(host_id) host.content_facet.try(:import_applicability, true) if host end end end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems