Class: PerfectQueue::TaskWithMetadata

Inherits:
Task
  • Object
show all
Includes:
TaskMetadataAccessors
Defined in:
lib/perfectqueue/task.rb

Direct Known Subclasses

AcquiredTask

Instance Attribute Summary

Attributes included from TaskMetadataAccessors

#attributes, #compression

Attributes inherited from Task

#key

Attributes included from Model

#client

Instance Method Summary collapse

Methods included from TaskMetadataAccessors

#created_at, #data, #finished?, #message, #running?, #status, #timeout, #type, #user, #waiting?

Methods inherited from Task

#exists?, #force_finish!, #metadata, #preempt

Methods included from Model

#config

Constructor Details

#initialize(client, key, attributes) ⇒ TaskWithMetadata

Returns a new instance of TaskWithMetadata.



55
56
57
58
59
# File 'lib/perfectqueue/task.rb', line 55

def initialize(client, key, attributes)
  super(client, key)
  @compression = attributes.delete(:compression)
  @attributes = attributes
end

Instance Method Details

#inspectObject



61
62
63
# File 'lib/perfectqueue/task.rb', line 61

def inspect
  "#<#{self.class} @key=#{@key.inspect} @attributes=#{@attributes.inspect}>"
end