lib/sidekiq/throttled/communicator/callbacks.rb in sidekiq-throttled-0.14.1 vs lib/sidekiq/throttled/communicator/callbacks.rb in sidekiq-throttled-0.15.0

- old
+ new

@@ -51,18 +51,16 @@ # Runs event handlers with given args. # # @param [#to_s] event # @param [Object] payload # @return [void] - def run(event, payload = nil) # rubocop:disable Metrics/MethodLength + def run(event, payload = nil) @mutex.synchronize do fiber = Fiber.new do @handlers[event.to_s].each do |callback| - begin - callback.call(payload) - rescue => e - handle_exception(e, :context => "sidekiq:throttled") - end + callback.call(payload) + rescue => e + handle_exception(e, :context => "sidekiq:throttled") end end fiber.resume end