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
base_folder()
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 40 def base_folder input[:base_folder] end
command()
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 29 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 33 def env super.merge( 'target' => base_folder, 'organization_id' => organization_id ) end
organization_id()
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 44 def organization_id input[:organization_id] end
plan(base_folder, organization_id)
click to toggle source
Calls superclass method
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 8 def plan(base_folder, organization_id) sequence do super( GenerateReportJob.output_label(organization_id), organization_id: organization_id, base_folder: base_folder ) plan_action( QueueForUploadJob, base_folder, ForemanInventoryUpload.facts_archive_name(organization_id), organization_id ) end end
rake_prefix()
click to toggle source
# File lib/foreman_inventory_upload/async/generate_report_job.rb, line 25 def rake_prefix 'foreman-' unless Rails.env.development? end