Sha256: 318602a7483409bee906a4db1ab387d23be0711cd3601681abdae673642df1a1

Contents?: true

Size: 550 Bytes

Versions: 8

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Config
    module Validators

      # Validator for async query executor configuration.
      #
      # @api private
      module AsyncQueryExecutor
        extend self


        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
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mongoid-8.1.7 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.6 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.5 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.4 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.3 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.2 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.1 lib/mongoid/config/validators/async_query_executor.rb
mongoid-8.1.0 lib/mongoid/config/validators/async_query_executor.rb