Sha256: 091bc2aff62c007688002d66a270fc36ba7242ad933b632876323e8353208058
Contents?: true
Size: 395 Bytes
Versions: 2
Compression:
Stored size: 395 Bytes
Contents
require 'rubygems' require '../lib/gearman' Gearman::Util.debug = true servers = ['localhost:4730'] w = Gearman::Worker.new(servers) # Add a handler for a "sleep" function that takes a single argument, the # number of seconds to sleep before reporting success. w.add_ability('fail_with_exception') do |data,job| raise Exception.new("Exception in worker (args: #{data.inspect})") end w.work
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
evented-gearman-ruby-1.0.0 | examples/worker_exception.rb |
gearman-ruby-2.0.0 | examples/worker_exception.rb |