Class: Faktory::BatchStatus
- Inherits:
-
Object
- Object
- Faktory::BatchStatus
- Defined in:
- lib/faktory/batch.rb
Instance Method Summary collapse
- #created_at ⇒ Object
- #description ⇒ Object
- #hash ⇒ Object
-
#initialize(bid) ⇒ BatchStatus
constructor
A new instance of BatchStatus.
- #parent_bid ⇒ Object
- #pending ⇒ Object
- #total ⇒ Object
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_at ⇒ Object
158 159 160 |
# File 'lib/faktory/batch.rb', line 158 def created_at hash["created_at"] end |
#description ⇒ Object
162 163 164 |
# File 'lib/faktory/batch.rb', line 162 def description hash["description"] end |
#hash ⇒ Object
154 155 156 |
# File 'lib/faktory/batch.rb', line 154 def hash @hash ||= Faktory.server{|c| c.batch_status(@bid) } end |
#parent_bid ⇒ Object
166 167 168 |
# File 'lib/faktory/batch.rb', line 166 def parent_bid hash["parent_bid"] end |
#pending ⇒ Object
174 175 176 |
# File 'lib/faktory/batch.rb', line 174 def pending hash["pending"] end |
#total ⇒ Object
170 171 172 |
# File 'lib/faktory/batch.rb', line 170 def total hash["total"] end |