config/initializers/sidekiq.rb in eivo-rails-sidekiq-0.1.1 vs config/initializers/sidekiq.rb in eivo-rails-sidekiq-0.1.2
- old
+ new
@@ -15,9 +15,16 @@
Sidekiq.configure_server do |config|
config.redis = redis_config.dup
if Rails.env.staging? || Rails.env.production?
config.log_formatter = ::EIVO::Formatter.new
+
+ config.error_handlers << proc do |error, context|
+ Sidekiq.logger.error {
+ error: ["#{e.class.name}: #{e.message}", e.backtrace.to_s.join("\n")].join("\n"),
+ context: context
+ }
+ end
end
end
ActiveJob::Base.queue_adapter = :sidekiq if defined?(ActiveJob)