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-10.1.2 app/mailers/rex_job_mailer.rb
foreman_remote_execution-12.0.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.1.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-11.1.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-11.1.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.1.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-8.3.3 app/mailers/rex_job_mailer.rb
foreman_remote_execution-8.3.2 app/mailers/rex_job_mailer.rb
foreman_remote_execution-11.0.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.7 app/mailers/rex_job_mailer.rb
foreman_remote_execution-8.3.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.6 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.5 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.4 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.3 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.2 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.1 app/mailers/rex_job_mailer.rb
foreman_remote_execution-10.0.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-8.3.0 app/mailers/rex_job_mailer.rb
foreman_remote_execution-9.1.0 app/mailers/rex_job_mailer.rb