Sha256: e3a0ec8ca06a7bfce6b3b1ea30ce965e9754e5fcd0deba9a261ec53b46d3dbf4
Contents?: true
Size: 497 Bytes
Versions: 2
Compression:
Stored size: 497 Bytes
Contents
require 'rubygems' require '../lib/gearman' Gearman::Util.debug = true servers = ['localhost:4730'] client = Gearman::Client.new(servers) task = Gearman::Task.new('fail_with_exception', "void") task.retries = 2 task.on_complete {|d| puts d } task.on_exception {|ex| puts "This should never be called" } task.on_warning {|warning| puts "WARNING: #{warning}" } task.on_retry { puts "PRE-RETRY HOOK: retry no. #{task.retries_done}" } task.on_fail { puts "TASK FAILED, GIVING UP" } client.run task
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
evented-gearman-ruby-1.0.0 | examples/client_exception.rb |
gearman-ruby-2.0.0 | examples/client_exception.rb |