class ForemanInventoryUpload::Async::GenerateReportJob
Public Class Methods
output_label(label)
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 4 def self.output_label(label) "report_for_#{label}" end
Public Instance Methods
command()
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 25 def command "#{rake_prefix}rake rh_cloud_inventory:report:generate" end
env()
click to toggle source
Calls superclass method
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 29 def env super.merge( 'target' => @base_folder, 'organization_id' => @organization ) end
perform(base_folder, organization)
click to toggle source
Calls superclass method
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 8 def perform(base_folder, organization) @base_folder = base_folder @organization = organization super(GenerateReportJob.output_label(organization)) QueueForUploadJob.perform_later( base_folder, ForemanInventoryUpload.facts_archive_name(organization), organization ) end
rake_prefix()
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 21 def rake_prefix 'foreman-' unless Rails.env.development? end