lib/stalker.rb in stalker-0.7.0 vs lib/stalker.rb in stalker-0.8.0

- old
+ new

@@ -94,10 +94,16 @@ raise rescue => e log_error exception_message(e) job.bury rescue nil log_job_end(name, 'failed') - error_handler.call(e) if error_handler + if error_handler + if error_handler.arity == 1 + error_handler.call(e) + else + error_handler.call(e, name, args) + end + end end def failed_connection(e) log_error exception_message(e) log_error "*** Failed connection to #{beanstalk_url}"