Sha256: 3943b9f039049be060e7c9344816a3eb43987f5825819a9ae6a58a35aca4ac7f

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

module Ddr::Batch

  class BatchProcessorRunMailer < ActionMailer::Base

    def send_notification(batch)
      @batch = batch
      @title = "Batch Processor Run #{@batch.status} #{@batch.outcome}"
      @host = `uname -n`.strip
      @subject = "[#{@host}] #{@title}"
      @size = @batch.batch_objects.size
      @handled = @batch.handled_count
      @success = @batch.success_count
      attachments["details.txt"] = File.read(@batch.logfile.path)
      mail(to: @batch.user.email, subject: @subject)
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ddr-batch-1.5.1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.5.0 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.5.0.rc1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.4.1 app/mailers/ddr/batch/batch_processor_run_mailer.rb