Class: RbEAI::GetTask

Inherits:
IOTask show all
Defined in:
lib/rbeai/TasksLogic.rb

Instance Attribute Summary

Attributes inherited from IOTask

#files, #location, #pattern, #rate

Attributes inherited from Task

#name, #nextTask, #size, #status, #wflow

Instance Method Summary collapse

Methods inherited from Task

#getItemsNext, #persist, #persistFtp, #persistStr

Constructor Details

#initialize(wflow, xmlFull, xmlDoc) ⇒ GetTask

Returns a new instance of GetTask.



235
236
237
238
# File 'lib/rbeai/TasksLogic.rb', line 235

def initialize(wflow, xmlFull, xmlDoc)    
  super(wflow, xmlFull, xmlDoc)
  @logic = GetLogic.new(xmlDoc, self)    
end

Instance Method Details

#doJob(resultQueue, obj) ⇒ Object



240
241
242
243
244
245
246
# File 'lib/rbeai/TasksLogic.rb', line 240

def doJob(resultQueue, obj)
  files = @logic.getFiles()
  files.each do |file|
    resultQueue.enq("#{file}")
    sleep(@rate.to_i)
  end
end