Skip to content

Commit

Permalink
Use sane defaults in the mongoid.yml for retries in the test env
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Oct 10, 2012
1 parent 392f672 commit 3f41996
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/rails/generators/mongoid/config/templates/mongoid.yml
Expand Up @@ -18,7 +18,15 @@ development:
# Change the default consistency model to :eventual or :strong.
# :eventual will send reads to secondaries, :strong sends everything
# to master. (default: :eventual)
consistency: :eventual
# consistency: :eventual

# How many times Moped should attempt to retry an operation after
# failure. (default: 30)
# max_retries: 30

# The time in seconds that Moped should wait before retrying an
# operation on failure. (default: 1)
# retry_interval: 1
# Configure Mongoid specific options. (optional)
options:
# Configuration for whether or not to allow access to fields that do
Expand Down Expand Up @@ -66,3 +74,7 @@ test:
- localhost:27017
options:
consistency: :strong
# In the test environment we lower the retries and retry interval to
# low amounts for fast failures.
max_retries: 1
retry_interval: 0

0 comments on commit 3f41996

Please sign in to comment.