Sha256: 884acf6081831e9363babbf467b25006c9486e0bbea0fcfd73a616301fca5acc
Contents?: true
Size: 806 Bytes
Versions: 6
Compression:
Stored size: 806 Bytes
Contents
class SyncRolesAndVariables < ::ApplicationJob queue_as :default def perform(changed, proxy) roles_importer = ForemanAnsible::UIRolesImporter.new(proxy) variables_importer = ForemanAnsible::VariablesImporter.new(proxy) roles_importer.finish_import(changed) variables_importer.import_variables_roles(changed) if changed['new'] || changed['old'] task = ForemanTasks::Task.where(:external_id => @provider_job_id)[0] ForemanAnsible::ImportRolesAndVariablesSuccessNotification.deliver!(task) rescue StandardError => e task = ForemanTasks::Task.where(:external_id => @provider_job_id)[0] notification = ForemanAnsible::ImportRolesAndVariablesErrorNotification.new(e, task) notification.deliver! end def humanized_name _('Import roles And Variables') end end
Version data entries
6 entries across 6 versions & 1 rubygems