Sha256: e18651c7c362e728a6271fa95c23d6f0c02c1a89e7da972f54d443e92c19a690

Contents?: true

Size: 295 Bytes

Versions: 9

Compression:

Stored size: 295 Bytes

Contents

require 'rubygems'
require '../lib/gearman'

Gearman::Util.debug = true

servers = ['localhost:4730']
worker = Gearman::Worker.new(servers)

worker.add_ability('chunked_transfer') do |data, job|
  5.times do |i|
    sleep 1
    job.send_data("CHUNK #{i}")
  end
  "EOD"
end
loop { worker.work }

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
gearman-ruby-3.0.8 examples/worker_data.rb
xing-gearman-ruby-1.3.0 examples/worker_data.rb
xing-gearman-ruby-1.3.1 examples/worker_data.rb
gearman-ruby-3.0.7 examples/worker_data.rb
gearman-ruby-3.0.6 examples/worker_data.rb
gearman-ruby-3.0.4 examples/worker_data.rb
gearman-ruby-3.0.3 examples/worker_data.rb
gearman-ruby-3.0.2 examples/worker_data.rb
gearman-ruby-3.0.1 examples/worker_data.rb