class method self.async_query_executor

Ruby on Rails 7.2.3

Since v7.2.3

Available in: v7.2.3 v8.0.4 v8.1.2

Sets the async_query_executor for an application. By default the thread pool executor set to nil which will not run queries in the background. Applications must configure a thread pool executor to use this feature. Options are:

* nil - Does not initialize a thread pool executor. Any async calls will be
run in the foreground.
* :global_thread_pool - Initializes a single +Concurrent::ThreadPoolExecutor+
that uses the +async_query_concurrency+ for the +max_threads+ value.
* :multi_thread_pool - Initializes a +Concurrent::ThreadPoolExecutor+ for each
database connection. The initializer values are defined in the configuration hash.
Source
# File activerecord/lib/active_record.rb, line 276
  singleton_class.attr_accessor :async_query_executor

Defined in activerecord/lib/active_record.rb line 276 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord

Type at least 2 characters to search.

↑↓ navigate · open · esc close