Class: QueueingRabbit::AbstractJob
- Inherits:
-
Object
- Object
- QueueingRabbit::AbstractJob
- Extended by:
- Job
- Defined in:
- lib/queueing_rabbit/jobs/abstract_job.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Attributes included from Bus
Instance Method Summary collapse
- #acknowledge ⇒ Object
- #headers ⇒ Object
-
#initialize(payload, metadata) ⇒ AbstractJob
constructor
A new instance of AbstractJob.
- #perform ⇒ Object
Methods included from Job
bind, bind_queue?, binding_declarations, demand_batch_publishing!, enqueue, extended, listen, listening_options, publishing_defaults, queue, queue_name, queue_options, queue_size
Methods included from Bus
#batch_publishing?, #channel, #channel_options, #demand_batch_publishing!, #exchange, #exchange_name, #exchange_options, extended, #publish, #publish_with, #publishing_defaults
Constructor Details
#initialize(payload, metadata) ⇒ AbstractJob
Returns a new instance of AbstractJob.
9 10 11 12 |
# File 'lib/queueing_rabbit/jobs/abstract_job.rb', line 9 def initialize(payload, ) @payload = payload @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
7 8 9 |
# File 'lib/queueing_rabbit/jobs/abstract_job.rb', line 7 def @metadata end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
7 8 9 |
# File 'lib/queueing_rabbit/jobs/abstract_job.rb', line 7 def payload @payload end |
Instance Method Details
#acknowledge ⇒ Object
14 15 16 |
# File 'lib/queueing_rabbit/jobs/abstract_job.rb', line 14 def acknowledge .ack end |
#headers ⇒ Object
18 19 20 |
# File 'lib/queueing_rabbit/jobs/abstract_job.rb', line 18 def headers .headers || {} end |
#perform ⇒ Object
22 23 |
# File 'lib/queueing_rabbit/jobs/abstract_job.rb', line 22 def perform end |