0

我已在 rails 4 应用程序上将 mongoid gem 从 mongoid-4 更新为 5。我在应用重启时面临以下警告

W, [2017-02-15T13:59:49.356541 #14483]  WARN -- : MONGODB Unsupported client option 'max_retries'. It will be ignored.

W, [2017-02-15T13:59:49.356739 #14483]  WARN -- : MONGODB 
Unsupported client option 'retry_interval'. It will be ignored.

W, [2017-02-15T13:59:49.356877 #14483]  WARN -- : MONGODB Unsupported client option 'username'. It will be ignored.

如何更新 Mongoid Yml 以消除警告?

这也是当前的 YML 文件

staging:
    clients:
      default:
         database: chillr_api
         hosts:
            - localhost:27017
      options:
        read:
          mode: :nearest
    # In the test environment we lower the retries and retry interval to
    # low amounts for fast failures.
          max_retries: 1
          retry_interval: 0
          username: 'username'
          password: 'username'
4

1 回答 1

0

Okey.似乎 max_retries 和 retry_interval 是助力车配置。由于 Moped 在 Mogoid 5 中被移除了这可以从配置中移除 .Yml 示例

于 2017-02-15T08:53:36.830 回答