Class: ActiveRecord::AsynchronousQueriesTracker
Do not use. This class is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Classes:
| |
Inherits: | Object |
Defined in: | activerecord/lib/active_record/asynchronous_queries_tracker.rb |
Class Method Summary
Instance Attribute Summary
- #current_session readonly
Instance Method Summary
Constructor Details
.new ⇒ AsynchronousQueriesTracker
# File 'activerecord/lib/active_record/asynchronous_queries_tracker.rb', line 46
def initialize @current_session = NullSession end
Class Method Details
.complete(asynchronous_queries_tracker)
[ GitHub ]# File 'activerecord/lib/active_record/asynchronous_queries_tracker.rb', line 39
def complete(asynchronous_queries_tracker) asynchronous_queries_tracker.finalize_session end
.install_executor_hooks(executor = ActiveSupport::Executor)
[ GitHub ]# File 'activerecord/lib/active_record/asynchronous_queries_tracker.rb', line 31
def install_executor_hooks(executor = ActiveSupport::Executor) executor.register_hook(self) end
.run
[ GitHub ]# File 'activerecord/lib/active_record/asynchronous_queries_tracker.rb', line 35
def run ActiveRecord::Base.asynchronous_queries_tracker.start_session end
Instance Attribute Details
#current_session (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/asynchronous_queries_tracker.rb', line 44
attr_reader :current_session
Instance Method Details
#finalize_session
[ GitHub ]# File 'activerecord/lib/active_record/asynchronous_queries_tracker.rb', line 55
def finalize_session @current_session.finalize @current_session = NullSession end