Class: PerfectQueue::TaskWithMetadata
- Includes:
- TaskMetadataAccessors
- Defined in:
- lib/perfectqueue/task.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from TaskMetadataAccessors
Attributes inherited from Task
Attributes included from Model
Instance Method Summary collapse
-
#initialize(client, key, attributes) ⇒ TaskWithMetadata
constructor
A new instance of TaskWithMetadata.
- #inspect ⇒ Object
Methods included from TaskMetadataAccessors
#cancel_requested?, #created_at, #data, #finished?, #message, #running?, #status, #timeout, #type, #user, #waiting?
Methods inherited from Task
#cancel_request!, #exists?, #force_finish!, #metadata, #preempt
Methods included from Model
Constructor Details
#initialize(client, key, attributes) ⇒ TaskWithMetadata
Returns a new instance of TaskWithMetadata.
59 60 61 62 63 |
# File 'lib/perfectqueue/task.rb', line 59 def initialize(client, key, attributes) super(client, key) @compression = attributes.delete(:compression) @attributes = attributes end |
Instance Method Details
#inspect ⇒ Object
65 66 67 |
# File 'lib/perfectqueue/task.rb', line 65 def inspect "#<#{self.class} @key=#{@key.inspect} @attributes=#{@attributes.inspect}>" end |