Module: Isolator::ActiveSupportSubscriber
- Defined in:
- lib/isolator/orm_adapters/active_support_subscriber.rb
Overview
ActiveSupport notifications listener Used for ActiveRecord and ROM::SQL (when instrumentation is available)
Defined Under Namespace
Classes: Subscriber
Constant Summary collapse
- START_PATTERN =
%r{(\ABEGIN|\ASAVEPOINT)}xi
- FINISH_PATTERN =
%r{(\ACOMMIT|\AROLLBACK|\ARELEASE|\AEND TRANSACTION)}xi
Class Method Summary collapse
Class Method Details
.subscribe!(event) ⇒ Object
47 48 49 50 |
# File 'lib/isolator/orm_adapters/active_support_subscriber.rb', line 47 def self.subscribe!(event) subscriber = Subscriber.new ::ActiveSupport::Notifications.subscribe(event, subscriber) end |