Method: Pmux::Worker#run

Defined in:
lib/pmux/worker.rb

#runObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/pmux/worker.rb', line 20

def run
  Log.debug "W#{$$}: run"
  while true
    task = @client.call :get_task
    result = exec_task task
    @client.call :put_result, result
  end
  Log.debug "W#{$$}: end"
rescue MR::TimeoutError
  Log.debug "W#{$$}: request timed out"
rescue MR::TransportError
  Log.debug "W#{$$}: transport closed"
end