Class: RbEAI::PutTask
Instance Attribute Summary
Attributes inherited from IOTask
#files, #location, #pattern, #rate
Attributes inherited from Task
#name, #nextTask, #size, #status, #wflow
Instance Method Summary collapse
- #doBuffered(buffer) ⇒ Object
- #doJob(resultQueue, obj) ⇒ Object
- #getItemsNext(numItems) ⇒ Object
-
#initialize(wflow, xmlFull, xmlDoc) ⇒ PutTask
constructor
A new instance of PutTask.
Methods inherited from Task
#persist, #persistFtp, #persistStr
Constructor Details
Instance Method Details
#doBuffered(buffer) ⇒ Object
272 273 274 275 276 277 278 279 280 281 |
# File 'lib/rbeai/TasksLogic.rb', line 272 def doBuffered(buffer) buffer.size.times do obj = buffer.deq if @rate.to_i != 0 print "Send doBuffered #{obj} > #{location}\n" @logic.putFile(obj) sleep(@rate.to_i) end end end |
#doJob(resultQueue, obj) ⇒ Object
258 259 260 261 262 263 264 265 266 |
# File 'lib/rbeai/TasksLogic.rb', line 258 def doJob(resultQueue, obj) if @rate.to_i != 0 super(resultQueue, obj) else print "Send doJob #{obj} > #{location}\n" @logic.putFile(obj) resultQueue.enq(obj) end end |
#getItemsNext(numItems) ⇒ Object
268 269 270 |
# File 'lib/rbeai/TasksLogic.rb', line 268 def getItemsNext(numItems) return numItems end |