Sha256: eac58d2f5cae58551f1c52dc77d304d734d33d8ad879e680235faee57ecbef90

Contents?: true

Size: 662 Bytes

Versions: 7

Compression:

Stored size: 662 Bytes

Contents

module ForemanInventoryUpload
  module Async
    class GenerateReportJob < ShellProcess
      def self.output_label(portal_user)
        "report_for_#{portal_user}"
      end

      def perform(result_file, portal_user)
        @result_file = result_file
        @portal_user = portal_user

        super(GenerateReportJob.output_label(portal_user))

        QueueForUploadJob.perform_later(result_file, portal_user)
      end

      def command
        'rake foreman_inventory_upload:report:generate'
      end

      def env
        super.merge(
          'target' => @result_file,
          'portal_user' => @portal_user
        )
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
foreman_inventory_upload-1.0.0.beta7 lib/foreman_inventory_upload/async/generate_report_job.rb
foreman_inventory_upload-1.0.0.beta5 lib/foreman_inventory_upload/async/generate_report_job.rb
foreman_inventory_upload-1.0.0.beta4 lib/foreman_inventory_upload/async/generate_report_job.rb
foreman_inventory_upload-1.0.0.beta3 lib/foreman_inventory_upload/async/generate_report_job.rb
foreman_inventory_upload-1.0.0.beta2 lib/foreman_inventory_upload/async/generate_report_job.rb
foreman_inventory_upload-1.0.0.beta1 lib/foreman_inventory_upload/async/generate_report_job.rb
foreman_inventory_upload-0.0.1.dev1 lib/foreman_inventory_upload/async/generate_report_job.rb