lib/ocean/zero_log.rb
#
# This is the PULL worker. This particular version just prints all 
# received data to STDOUT. Overload this method for other types of
# processing (such as storing received log info in a database).
#
This is the PULL worker. This particular version just prints all
received data to STDOUT. Overload this method for other types of
processing (such as storing received log info in a database).
This is the PULL worker . This particular version just prints all received data to STDOUT . Overload this method for other types of processing ( such as storing received log info in a database ) .
def pull_worker(address=PUSH_ADDRESS)
    puller = context.socket(ZMQ::PULL)
    puller.connect(address)
    trap_int(puller)
    while true do
      s = ''
      puller.recv_string(s)
      puts "Received: #{s}"
    end
  end
def pull_worker ( address = PUSH_ADDRESS ) puller = context . socket ( ZMQ :: PULL ) puller . connect ( address ) trap_int ( puller ) while true do s = '' puller . recv_string ( s ) puts "Received: #{s}" end end
This is the PULL worker.
This is the PULL worker .
#puts "Starting PULL worker" #puts "Connect to the PUSH socket"
address