search for: on_data

Displaying 3 results from an estimated 3 matches for "on_data".

Did you mean: in_data
2008 Jan 14
10
Using EventMachine to listen from non-network
I''ve actually found a way to make EventMachine listen to events from a serial port, but only by using the pure Ruby version, using Guilliame Pierronnet''s Ruby/SerialPort library. It turned out to be simpler than I thought it would be: require ''serialport'' $eventmachine_library = :pure_ruby require ''eventmachine'' module EventMachine class
2008 Oct 20
0
CGI and NET::SSH in the same script problems
...ync_cmd( session, command ) session.open_channel do |channel| channel.env("PATH", "/usr/pbs/bin:/acct/uzer/test/bin") channel.exec("#{command}") do |ch, success| abort @myString.concat("could not execute #{command}") unless success channel.on_data do |ch, data| @myString.concat("cmd=>[#{command}] got stdout: \n#{data}") channel.send_data "something for stdin\n" end channel.on_extended_data do |ch, type, data| @myString.concat("cmd=>[#{command}] stderr: \n#{data}")...
2006 Aug 16
7
Forward of moderated message
OK I know whats happening. Your while loop completes and calls kill on the worker before your task_progress controller method ever gets called> So the worker is deleted and when you try to access it from rails you get an error because there is no longer a worker at that job key. The kill method is meant to be used within a worker that you fire and forget. If you want to get the