Class: PerfectQueue::TaskMetadata

Inherits:
Object
  • Object
show all
Includes:
Model, TaskMetadataAccessors
Defined in:
lib/perfectqueue/task_metadata.rb

Instance Attribute Summary

Attributes included from TaskMetadataAccessors

#attributes

Attributes included from Model

#client

Instance Method Summary collapse

Methods included from TaskMetadataAccessors

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

Methods included from Model

#config

Constructor Details

#initialize(client, key, attributes) ⇒ TaskMetadata

Returns a new instance of TaskMetadata.



83
84
85
86
87
# File 'lib/perfectqueue/task_metadata.rb', line 83

def initialize(client, key, attributes)
  super(client)
  @key = key
  @attributes = attributes
end

Instance Method Details

#inspectObject



93
94
95
# File 'lib/perfectqueue/task_metadata.rb', line 93

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

#taskObject



89
90
91
# File 'lib/perfectqueue/task_metadata.rb', line 89

def task
  Task.new(@client, @key)
end