Class: ActiveMessaging::Adapters::Beanstalk::Message
- Inherits:
-
BaseMessage
- Object
- BaseMessage
- ActiveMessaging::Adapters::Beanstalk::Message
- Defined in:
- lib/activemessaging/adapters/beanstalk.rb
Instance Attribute Summary collapse
-
#beanstalk_job ⇒ Object
Returns the value of attribute beanstalk_job.
Attributes inherited from BaseMessage
#body, #destination, #headers, #id
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(beanstalk_job) ⇒ Message
constructor
A new instance of Message.
- #release ⇒ Object
Methods inherited from BaseMessage
#dup, #matches_subscription?, #to_s
Constructor Details
#initialize(beanstalk_job) ⇒ Message
Returns a new instance of Message.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/activemessaging/adapters/beanstalk.rb', line 67 def initialize beanstalk_job bsh = { 'destination' => beanstalk_job.stats['tube'], 'priority' => beanstalk_job.pri, 'delay' => beanstalk_job.delay, 'ttr' => beanstalk_job.ttr } super(beanstalk_job.body, beanstalk_job.id, bsh, beanstalk_job.stats['tube']) @beanstalk_job = beanstalk_job end |
Instance Attribute Details
#beanstalk_job ⇒ Object
Returns the value of attribute beanstalk_job.
65 66 67 |
# File 'lib/activemessaging/adapters/beanstalk.rb', line 65 def beanstalk_job @beanstalk_job end |
Instance Method Details
#delete ⇒ Object
78 79 80 |
# File 'lib/activemessaging/adapters/beanstalk.rb', line 78 def delete @beanstalk_job.delete end |
#release ⇒ Object
82 83 84 |
# File 'lib/activemessaging/adapters/beanstalk.rb', line 82 def release @beanstalk_job.release end |