Sha256: 9ceeae8023bbc27722d367c744683d93ecd2bd9b91867c445bdd3d120cfdd2f4
Contents?: true
Size: 391 Bytes
Versions: 12
Compression:
Stored size: 391 Bytes
Contents
#!/usr/bin/env ruby $:.unshift File.dirname(__FILE__)+"/../../lib/" require 'magent' id = "#{rand(16)}#{rand(16)}#{rand(16)}#{rand(16)}" values = (1..5).to_a.map { rand(10) } puts values.join(" + ") Magent.push("workers", :sum, id, *values) channel = Magent::GenericChannel.new("+#{id}") loop do v = channel.dequeue; if v $stdout.puts v.inspect break end sleep 0.1 end
Version data entries
12 entries across 12 versions & 2 rubygems