Sha256: d26a13914575365e7e7dffe9f6ad70c06bacce7f77c3284718e37c28e5fc2738

Contents?: true

Size: 376 Bytes

Versions: 57

Compression:

Stored size: 376 Bytes

Contents

class RexJobMailer < ApplicationMailer
  helper ApplicationHelper

  def job_finished(job, opts = {})
    @job = job
    @subject = opts[:subject] || _('REX job has finished - %s') % @job.to_s

    if @job.user.nil?
      Rails.logger.warn 'Job user no longer exist, skipping email notification'
      return
    end

    mail(to: @job.user.mail, subject: @subject)
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-14.1.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-14.0.2 app/mailers/rex_job_mailer.rb
foreman_remote_execution-14.0.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.6 app/mailers/rex_job_mailer.rb
foreman_remote_execution-14.0.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.5 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.4 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.3 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.2 app/mailers/rex_job_mailer.rb
foreman_remote_execution-12.0.7 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.2.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.1.3 app/mailers/rex_job_mailer.rb
foreman_remote_execution-13.0.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-12.0.5 app/mailers/rex_job_mailer.rb
foreman_remote_execution-12.0.4 app/mailers/rex_job_mailer.rb
foreman_remote_execution-12.0.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-12.0.2 app/mailers/rex_job_mailer.rb
foreman_remote_execution-11.1.3 app/mailers/rex_job_mailer.rb