Class: Jenode::Job
- Inherits:
-
Object
- Object
- Jenode::Job
- Defined in:
- lib/jenode/job.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
- #ack ⇒ Object
-
#initialize(data, metadata) ⇒ Job
constructor
A new instance of Job.
- #reject ⇒ Object
Constructor Details
#initialize(data, metadata) ⇒ Job
Returns a new instance of Job.
5 6 7 8 |
# File 'lib/jenode/job.rb', line 5 def initialize(data, ) @payload = MultiJson.load(data) = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/jenode/job.rb', line 3 def end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
3 4 5 |
# File 'lib/jenode/job.rb', line 3 def payload @payload end |
Instance Method Details
#ack ⇒ Object
10 11 12 |
# File 'lib/jenode/job.rb', line 10 def ack .ack end |
#reject ⇒ Object
14 15 16 |
# File 'lib/jenode/job.rb', line 14 def reject .reject(requeue: true) end |