Class: Faktory::BatchStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/faktory/batch.rb

Instance Method Summary collapse

Constructor Details

#initialize(bid) ⇒ BatchStatus

Returns a new instance of BatchStatus.



150
151
152
# File 'lib/faktory/batch.rb', line 150

def initialize(bid)
  @bid = bid
end

Instance Method Details

#created_atObject



158
159
160
# File 'lib/faktory/batch.rb', line 158

def created_at
  hash["created_at"]
end

#descriptionObject



162
163
164
# File 'lib/faktory/batch.rb', line 162

def description
  hash["description"]
end

#hashObject



154
155
156
# File 'lib/faktory/batch.rb', line 154

def hash
  @hash ||= Faktory.server{|c| c.batch_status(@bid) }
end

#parent_bidObject



166
167
168
# File 'lib/faktory/batch.rb', line 166

def parent_bid
  hash["parent_bid"]
end

#pendingObject



174
175
176
# File 'lib/faktory/batch.rb', line 174

def pending
  hash["pending"]
end

#totalObject



170
171
172
# File 'lib/faktory/batch.rb', line 170

def total
  hash["total"]
end