Class: QProcessor::BeanstalkMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/qprocessor/beanstalk_message.rb

Instance Attribute Summary

Attributes inherited from Message

#source

Instance Method Summary collapse

Methods inherited from Message

#body

Constructor Details

#initialize(source) ⇒ BeanstalkMessage

Returns a new instance of BeanstalkMessage.



5
6
7
# File 'lib/qprocessor/beanstalk_message.rb', line 5

def initialize(source)
  super(source)
end

Instance Method Details

#disposeObject

Disposes of the underlying job, deleting it from Beanstalk.



10
11
12
# File 'lib/qprocessor/beanstalk_message.rb', line 10

def dispose
  source.delete
end

#idObject

Retrieve the message identifier.



15
16
17
# File 'lib/qprocessor/beanstalk_message.rb', line 15

def id
  source.id
end

#releaseObject

Releases the job back to Beanstalk.



20
21
22
# File 'lib/qprocessor/beanstalk_message.rb', line 20

def release
  source.release
end