Class: Announce::Adapters::InlineAdapter::Topic
- Inherits:
-
BaseAdapter::Topic
- Object
- BaseAdapter::Destination
- BaseAdapter::Topic
- Announce::Adapters::InlineAdapter::Topic
- Defined in:
- lib/announce/adapters/inline_adapter.rb
Instance Attribute Summary
Attributes inherited from BaseAdapter::Destination
Instance Method Summary collapse
Methods inherited from BaseAdapter::Destination
app, #create, delimiter, #initialize, #name, name_for, namespace, prefix, #verify
Constructor Details
This class inherits a constructor from Announce::Adapters::BaseAdapter::Destination
Instance Method Details
#publish(message, options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/announce/adapters/inline_adapter.rb', line 24 def publish(, = {}) queue_name = Queue.name_for(subject, action) worker_class = InlineAdapter.subscriptions[queue_name] if defined?(::ActiveJob) job = worker_class.new() ::ActiveJob::Base.execute(job.serialize) else worker_class.new.perform() end end |