Sha256: 8c5c4b3e23dc63ec7114c0de85e1558dd633d32da0a526d5446a7b39d206440b
Contents?: true
Size: 575 Bytes
Versions: 2
Compression:
Stored size: 575 Bytes
Contents
#!/usr/bin/env ruby $:.unshift File.join(File.dirname(__FILE__), '..', "lib" ) require 'gearman' # Client using Gearman SUBMIT_JOB_EPOCH (currently requires the gearmand branch lp:~jewart/gearmand/scheduled_jobs_support/) t = nil threadcounter = 0 client = Gearman::Client.new('localhost:4730') myid = threadcounter threadcounter += 1 taskset = Gearman::TaskSet.new(client) (1..100).each do |jid| data = rand(36**8).to_s(36) puts "#{jid} #{data}" task = Gearman::Task.new("reverse_string", data) task.on_complete {|d| puts d } client.do_task(task) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gearman-ruby-4.0.3 | examples/client_reverse_wait.rb |
gearman-ruby-4.0.2 | examples/client_reverse_wait.rb |