development:
  # Configure available database sessions. (required)
  clients:
    # Defines the default session. (required)
    default:
      # Defines the name of the default database that Mongoid can connect to.
      # (required).
      database: <%= MongoidConfigurator.database_name %>
      # Provides the hosts the default session can connect to. Must be an array
      # of host:port pairs. (required)
      hosts:
        #- 10.100.0.15:33215
        - localhost:27017
      options:
        # Change the default write concern. (default = { w: 1 })
        write:
          w: 1

        # Change the default consistency model to primary, secondary.
        # 'secondary' will send reads to secondaries, 'primary' sends everything
        # to master. (default: primary)
        # read: secondary_preferred

        # How many times Moped should attempt to retry an operation after
        # failure. (default: The number of nodes in the cluster)
        # max_retries: 20

        # The time in seconds that Moped should wait before retrying an
        # operation on failure. (default: 0.25)
        # retry_interval: 0.25

        # The connection pool size per-node.  This should match or exceed the
        # number of threads for a multi-threaded application. (default: 5)
        max_pool_size: 15

        # The time in seconds that Moped should wait for the pool to provide
        # an available connection.  This number should probably remain at the
        # default, unless for some reason you absolutely need to limit the
        # pool_size, as this wait is only used when the pool is saturated.
        # (default: 0.5)
        # pool_timeout: 0.5

        # The time in seconds before Moped will timeout connection and node
        # operations. (default: 5)
        connect_timeout: 20

        # The amount of time in seconds between forced refreshes of node
        # information including the discovery of new peers. (default: 300)
        # refresh_interval: 300

        # The amount of time in seconds that a node will be flagged as down.
        # (default: 30)
        # down_interval: 30

        # Whether connections should use SSL. (default: nil/false)
        # ssl: false

        # Whether Moped will use the existing seeds/nodes to find other peers.
        # (default: true)
        # auto_discover: true

  # Configure Mongoid specific options. (optional)
  options:
    # Includes the root model name in json serialization. (default: false)
    # include_root_in_json: false

    # Include the _type field in serialization. (default: false)
    # include_type_for_serialization: false

    # Preload all models in development, needed when models use
    # inheritance. (default: false)
    # preload_models: false

    # Protect id and type from mass assignment. (default: true)
    # protect_sensitive_fields: true

    # Raise an error when performing a #find and the document is not found.
    # (default: true)
    raise_not_found_error: false

    # Raise an error when defining a scope with the same name as an
    # existing method. (default: false)
    # scope_overwrite_exception: false

    # Use Active Support's time zone in conversions. (default: true)
    # use_activesupport_time_zone: true

    # Ensure all times are UTC in the app side. (default: false)
    # use_utc: false

test:
  clients:
    default:
      database: onepagecrm-test
      hosts:
        - localhost:27017
      options:
        read:
          mode: :primary
        # In the test environment we lower the retries and retry interval to
        # low amounts for fast failures.
        max_retries: 1
        retry_interval: 0
  options:
    raise_not_found_error: false

production:
  # Configure available database sessions. (required)
  clients:
    # Defines the default session. (required)
    default:
      # Defines the name of the default database that Mongoid can connect to.
      # (required).
      database: onepagecrm-production
      # Provides the hosts the default session can connect to. Must be an array
      # of host:port pairs. (required)
      hosts:
        - 10.0.2.102:27017
        - 10.0.2.103:27017
        - 10.0.2.104:27017
      options:
        # Change the default write concern. (default = { w: 1 })
        write:
          w: 1

        # Change the default consistency model to primary, secondary.
        # 'secondary' will send reads to secondaries, 'primary' sends everything
        # to master. (default: primary)
        read:
          mode: :primary

        # How many times Moped should attempt to retry an operation after
        # failure. (default: The number of nodes in the cluster)
        # max_retries: 20

        # The time in seconds that Moped should wait before retrying an
        # operation on failure. (default: 0.25)
        # retry_interval: 0.25

        # The connection pool size per-node.  This should match or exceed the
        # number of threads for a multi-threaded application. (default: 5)
        max_pool_size: 15

        # The time in seconds that Moped should wait for the pool to provide
        # an available connection.  This number should probably remain at the
        # default, unless for some reason you absolutely need to limit the
        # pool_size, as this wait is only used when the pool is saturated.
        # (default: 0.5)
        # pool_timeout: 0.5

        # The time in seconds before Moped will timeout connection and node
        # operations. (default: 5)
        connect_timeout: 20

        # The amount of time in seconds between forced refreshes of node
        # information including the discovery of new peers. (default: 300)
        # refresh_interval: 300

        # The amount of time in seconds that a node will be flagged as down.
        # (default: 30)
        # down_interval: 30

        # Whether connections should use SSL. (default: nil/false)
        # ssl: false

        # Whether Moped will use the existing seeds/nodes to find other peers.
        # (default: true)
        # auto_discover: true

  # Configure Mongoid specific options. (optional)
  options:
    # Includes the root model name in json serialization. (default: false)
    # include_root_in_json: false

    # Include the _type field in serialization. (default: false)
    # include_type_for_serialization: false

    # Preload all models in development, needed when models use
    # inheritance. (default: false)
    # preload_models: false

    # Protect id and type from mass assignment. (default: true)
    # protect_sensitive_fields: true

    # Raise an error when performing a #find and the document is not found.
    # (default: true)
    raise_not_found_error: false

    # Raise an error when defining a scope with the same name as an
    # existing method. (default: false)
    # scope_overwrite_exception: false

    # Use Active Support's time zone in conversions. (default: true)
    # use_activesupport_time_zone: true

    # Ensure all times are UTC in the app side. (default: false)
    # use_utc: false
