lib/chook/event/handled_event.rb
def pipe_to_executable(handler)
      logger.debug "EXTERNAL: Sending JSON to stdin of '#{handler.basename}'"
      _thread = Thread.new do
        IO.popen([handler.to_s], 'w') { |h| h.puts @raw_json }
      end
    end
# TODO: these threads will die midstream when the server stops.
# Find a way to .join them or otherwise clean them up.
these threads will die midstream when the server stops.
Find a way to .join them or otherwise clean them up.
these threads will die midstream when the server stops . Find a way to . join them or otherwise clean them up .
def pipe_to_executable(handler)
      logger.debug "EXTERNAL: Sending JSON to stdin of '#{handler.basename}'"
      _thread = Thread.new do
        IO.popen([handler.to_s], 'w') { |h| h.puts @raw_json }
      end
    end
def pipe_to_executable ( handler ) logger . debug "EXTERNAL: Sending JSON to stdin of '#{handler.basename}'" _thread = Thread . new do IO . popen ( [ handler . to_s ] , 'w' ) { | h | h . puts @raw_json } end end
TODO: these threads will die midstream when the server stops.
TODO : these threads will die midstream when the server stops .
handler