Class: Thunderer::Messages::AsyncMessage::Job

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/thunderer/messages/async_message.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.queue_adapterObject



8
9
10
11
12
13
14
# File 'lib/thunderer/messages/async_message.rb', line 8

def queue_adapter
  if Thunderer.config.queue_adapter
    "ActiveJob::QueueAdapters::#{Thunderer.config.queue_adapter.to_s.camelize}Adapter".constantize
  else
    super
  end
end

Instance Method Details

#perform(message) ⇒ Object



17
18
19
# File 'lib/thunderer/messages/async_message.rb', line 17

def perform(message)
  Thunderer::Messages::Base.new(message).deliver
end