lib/dispatch-rider/integrations/appsignal.rb in dispatch-rider-1.2.1 vs lib/dispatch-rider/integrations/appsignal.rb in dispatch-rider-1.2.2
- old
+ new
@@ -31,13 +31,26 @@
end
end
end
- DispatchRider.config do |config|
+ app_settings = ::Sinatra::Application.settings
+ Appsignal.config = Appsignal::Config.new(
+ app_settings.root,
+ app_settings.environment
+ )
- config.around(:dispatch_message) do |job, message|
- DispatchRider::Appsignal.wrap_message(job, message)
+ Appsignal.start_logger(app_settings.root)
+
+ if Appsignal.active?
+ Appsignal.start
+
+ DispatchRider.config do |config|
+
+ config.around(:dispatch_message) do |job, message|
+ DispatchRider::Appsignal.wrap_message(job, message)
+ end
+
end
end
end