Sha256: ff108397407fd607b0e0050c8ab90e7a4e5df95cd6b639f6cc3daaf9dd75c742
Contents?: true
Size: 404 Bytes
Versions: 10
Compression:
Stored size: 404 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 loop { w.work }
Version data entries
10 entries across 10 versions & 2 rubygems