Project

General

Profile

« Previous | Next » 

Revision 29b2a618

Added by Ivan Necas almost 10 years ago

Fixes #6304 - remove apply default info

As the feature is not reachable by the current UI/API and CLI and
there are no recent plans for enabling this feature again (probably
the foreman facts might be used instead), I'm removing the apply
default info to all hosts, as it's one of the last parts of the
code-base using delayed jobs and investing time to rewriting this to
Dynflow is not effective.

View differences:

app/models/katello/concerns/organization_extensions.rb
end
end
def apply_default_info(informable_type, custom_info, options = {})
options = {:async => true}.merge(options)
Organization.check_informable_type!(informable_type)
objects = self.send(informable_type.pluralize)
ids_and_types = objects.inject([]) do |collection, obj|
collection << { :informable_type => obj.class.name, :informable_id => obj.id }
end
if options[:async]
task = self.async(:organization => self, :task_type => "apply default info").run_apply_info(ids_and_types, custom_info)
self.apply_info_task_id = task.id
self.save!
return task
else
return CustomInfo.apply_to_set(ids_and_types, custom_info)
end
end
def run_apply_info(ids_and_types, custom_info)
CustomInfo.apply_to_set(ids_and_types, custom_info)
end
def syncable_content?
products.any?(&:syncable_content?)
end

Also available in: Unified diff