Sha256: 411ef34aef0dd01dcc692d6cbbca815d7fbebfc3de8f10aeab2b81485595c224

Contents?: true

Size: 489 Bytes

Versions: 16

Compression:

Stored size: 489 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}"
      @host = `uname -n`.strip
      @subject = "[#{@host}] #{@title}"
      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

16 entries across 16 versions & 1 rubygems

Version Path
ddr-batch-1.1.0 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.1.0.rc2 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.1.0.rc1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-2.0.0.beta.2 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-2.0.0.beta.1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-2.0.0.alpha.3 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.2 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.2.rc1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-2.0.0.alpha.2 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-2.0.0.alpha.1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.1 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.0 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.0.rc4 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.0.rc3 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.0.rc2 app/mailers/ddr/batch/batch_processor_run_mailer.rb
ddr-batch-1.0.0.rc1 app/mailers/ddr/batch/batch_processor_run_mailer.rb