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.



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

def initialize(bid)
  @bid = bid
end

Instance Method Details

#created_atObject



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

def created_at
  hash["created_at"]
end

#descriptionObject



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

def description
  hash["description"]
end

#hashObject



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

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

#parent_bidObject



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

def parent_bid
  hash["parent_bid"]
end

#pendingObject



178
179
180
# File 'lib/faktory/batch.rb', line 178

def pending
  hash["pending"]
end

#totalObject



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

def total
  hash["total"]
end