Class: Qs::QueueItem
- Inherits:
-
Object
- Object
- Qs::QueueItem
- Defined in:
- lib/qs/queue_item.rb
Instance Attribute Summary collapse
-
#encoded_payload ⇒ Object
readonly
Returns the value of attribute encoded_payload.
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#finished ⇒ Object
Returns the value of attribute finished.
-
#handler_class ⇒ Object
Returns the value of attribute handler_class.
-
#message ⇒ Object
Returns the value of attribute message.
-
#queue_redis_key ⇒ Object
readonly
Returns the value of attribute queue_redis_key.
-
#started ⇒ Object
Returns the value of attribute started.
-
#time_taken ⇒ Object
Returns the value of attribute time_taken.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(queue_redis_key, encoded_payload) ⇒ QueueItem
constructor
A new instance of QueueItem.
Constructor Details
#initialize(queue_redis_key, encoded_payload) ⇒ QueueItem
Returns a new instance of QueueItem.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/qs/queue_item.rb', line 10 def initialize(queue_redis_key, encoded_payload) @queue_redis_key = queue_redis_key @encoded_payload = encoded_payload @started = false @finished = false @message = nil @handler_class = nil @exception = nil @time_taken = nil end |
Instance Attribute Details
#encoded_payload ⇒ Object (readonly)
Returns the value of attribute encoded_payload.
5 6 7 |
# File 'lib/qs/queue_item.rb', line 5 def encoded_payload @encoded_payload end |
#exception ⇒ Object
Returns the value of attribute exception.
8 9 10 |
# File 'lib/qs/queue_item.rb', line 8 def exception @exception end |
#finished ⇒ Object
Returns the value of attribute finished.
6 7 8 |
# File 'lib/qs/queue_item.rb', line 6 def finished @finished end |
#handler_class ⇒ Object
Returns the value of attribute handler_class.
7 8 9 |
# File 'lib/qs/queue_item.rb', line 7 def handler_class @handler_class end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/qs/queue_item.rb', line 7 def @message end |
#queue_redis_key ⇒ Object (readonly)
Returns the value of attribute queue_redis_key.
5 6 7 |
# File 'lib/qs/queue_item.rb', line 5 def queue_redis_key @queue_redis_key end |
#started ⇒ Object
Returns the value of attribute started.
6 7 8 |
# File 'lib/qs/queue_item.rb', line 6 def started @started end |
#time_taken ⇒ Object
Returns the value of attribute time_taken.
8 9 10 |
# File 'lib/qs/queue_item.rb', line 8 def time_taken @time_taken end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/qs/queue_item.rb', line 22 def ==(other) if other.kind_of?(self.class) self.queue_redis_key == other.queue_redis_key && self.encoded_payload == other.encoded_payload else super end end |