Sha256: edaf6388af9719b6f2008a27879e2c4c93affdecab1b0df531ce3fb71e093846

Contents?: true

Size: 330 Bytes

Versions: 9

Compression:

Stored size: 330 Bytes

Contents

require 'rubygems'
#require 'gearman'
require '../lib/gearman'
Gearman::Util.debug = true

servers = ['localhost:4730', 'localhost:4731']
  
client = Gearman::Client.new(servers)
taskset = Gearman::TaskSet.new(client)

task = Gearman::Task.new('sleep', 20)
task.on_complete {|d| puts d }

taskset.add_task(task)
taskset.wait(100)

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
xing-gearman-ruby-1.0.0 examples/client.rb
xing-gearman-ruby-1.1.0 examples/client.rb
xing-gearman-ruby-1.2.0 examples/client.rb
xing-gearman-ruby-1.3.0 examples/client.rb
xing-gearman-ruby-1.3.1 examples/client.rb
gearman-ruby-3.0.4 examples/client.rb
gearman-ruby-3.0.3 examples/client.rb
gearman-ruby-3.0.2 examples/client.rb
gearman-ruby-3.0.1 examples/client.rb