Class: CommunicationJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
app/jobs/communication_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(arguments) ⇒ Object



11
12
13
14
15
16
17
# File 'app/jobs/communication_job.rb', line 11

def perform(arguments)
  if communication = Auth.configuration.communication_class.constantize.find_communication(arguments)
    if time = communication.deliver_all
      CommunicationJob.set(wait_until: time).perform_later(arguments)
    end
  end
end

#StandardErrorObject

we currently log all exceptions to redis.



6
7
8
9
# File 'app/jobs/communication_job.rb', line 6

rescue_from(StandardError) do |exception|
	puts exception.message
 	puts exception.backtrace.join("\n")
end