lib/sidekiq/expected_failures/middleware.rb in sidekiq-expected_failures-0.2.2 vs lib/sidekiq/expected_failures/middleware.rb in sidekiq-expected_failures-0.2.3
- old
+ new
@@ -1,10 +1,11 @@
+require 'sidekiq/exception_handler'
+
module Sidekiq
module ExpectedFailures
class Middleware
- include Sidekiq::Util
-
+ include ExceptionHandler
attr_reader :handled_exceptions
def call(worker, msg, queue)
setup_exceptions(worker)
@@ -15,10 +16,9 @@
failed_at: Time.now.strftime("%Y/%m/%d %H:%M:%S %Z"),
args: msg['args'],
exception: ex.class.to_s,
error: ex.message,
worker: msg['class'],
- processor: "#{hostname}:#{process_id}-#{Thread.current.object_id}",
queue: queue
}
log_exception(data, ex, msg)
end