DBDaemon/lib/scanner.rb
### called via DRB to start scann process *************************************************************
called via DRB to start scann process
called via DRB to start scann process
def scanner_start_scann(device, color)
    t=Thread.new do
      begin
        scanner_status_update("Start for device #{device} and color: #{color}")
        scann_command=scanner_build_command(device, color)
        @prepare_upload_thread=prepare_upload_thread unless @scann_converter_running
    result = %x[#{scann_command}] 
        scanner_status_update("Ready:#{result}",true) 
      rescue => e
        puts "************ ERROR *****: #{e.message}"
        raise
      end
    end
    t.abort_on_exception = true
  end
def scanner_start_scann ( device , color ) t = Thread . new do begin scanner_status_update ( "Start for device #{device} and color: #{color}" ) scann_command = scanner_build_command ( device , color ) @prepare_upload_thread = prepare_upload_thread unless @scann_converter_running result = %x[ #{ scann_command } ] scanner_status_update ( "Ready:#{result}" , true ) rescue => e puts "************ ERROR *****: #{e.message}" raise end end t . abort_on_exception = true end
called via DRB to start scann process
called via DRB to start scann process
## new thread needed to return to DRB call asap ### File Conversion Thread ############ HERE IS THE SCANNING ## true to say we are running to scan new data
device
<not_specific>
color
<not_specific>