模块:Mongoid::Config::Validators::AsyncQueryExecutor Private

扩展方式:
AsyncQueryExecutor
包含在:
AsyncQueryExecutor
定义于:
lib/mongoid/config/validators/async_query_executor.rb

Overview

该模块是私有 API 的一部分。 您应尽可能避免使用此模块,因为它将来可能会被删除或更改。

验证 Mongoid 配置中的异步查询执行器选项。 在应用程序引导期间使用。

实例方法摘要折叠

实例方法详细信息

# validate (options) ⇒对象

此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。

验证与异步查询执行器相关的 Mongoid 配置选项。

参数:

  • 选项 (哈希)

    配置选项。



24
25
26
27
28
29
30
# File 'lib/mongoid/config/validators/async_query_executor.rb', line 24

def 验证(选项)
  if 选项.键?(:async_query_executor)
    if 选项[:async_query_executor].to_sym == :immediate && !选项[:global_executor_concurrency].nil?
      提高 Errors::InvalidGlobalExecutorConcurrency
    end
  end
end