Sha256: abd09adf52c769c68a9714f19049f23ab1bdeb7cbfae2b54a90bd4e48c51844b

Contents?: true

Size: 624 Bytes

Versions: 10

Compression:

Stored size: 624 Bytes

Contents

module Ddr::Batch

  class BatchProcessorRunMailer < ActionMailer::Base

    default :from => "noreply@duke.edu"

    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
      from = "#{`echo $USER`.strip}@#{@host}"
      attachments["details.txt"] = File.read(@batch.logfile.path)
      mail(from: from, to: @batch.user.email, subject: @subject)
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ddr-batch-1.4.0 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.4.0.rc1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.3.0 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.3.0.rc1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.2.0 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.2.0.rc6 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.2.0.rc5 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.2.0.rc4 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.2.0.rc3 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.2.0.rc2 app/mailers/ddr/batch/batch_processor_run_mailer.rb