Module: Mongoid::Config::Validators::AsyncQueryExecutor Private

Extended by:
AsyncQueryExecutor
Included in:
AsyncQueryExecutor
Defined in:
build/mongoid-master/lib/mongoid/config/validators/async_query_executor.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Validator for async query executor configuration.

Instance Method Summary collapse

Instance Method Details

#validate(options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
17
18
19
20
# File 'build/mongoid-master/lib/mongoid/config/validators/async_query_executor.rb', line 14

def validate(options)
  if options.key?(:async_query_executor)
    if options[:async_query_executor].to_sym == :immediate && !options[:global_executor_concurrency].nil?
      raise Errors::InvalidGlobalExecutorConcurrency
    end
  end
end