Skip to content

Commit a738e98

Browse files
author
Dave Newman
committed
Merge remote-tracking branch 'production/master'
2 parents fc13a8f + fb0f6c0 commit a738e98

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

config/database.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
test:
22
adapter: postgresql
3-
database: uglst_test
3+
database: coderwall_test
44
encoding: unicode
55
username: postgres

config/mongoid.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,31 @@ staging:
1717
default:
1818
uri: <%= ENV['MONGOLAB_URI'] %>
1919

20+
# mongoid 3.x
21+
#
22+
# As discussed in: http://blog.mongolab.com/2014/02/mongodb-driver-tips-tricks-mongoid-3
23+
#
2024
production:
2125
sessions:
22-
default:
23-
uri: <%= ENV['MONGOLAB_URI'] %>
26+
default:
27+
# The standard MongoDB connection URI allows for easy replica set connection setup.
28+
# Use environment variables or a config file to keep your credentials safe.
29+
uri: <%= ENV['MONGOLAB_URI'] %>
30+
31+
options:
32+
# The default consistency is :eventual, which reads from secondaries when possible.
33+
# Strong forces reads to primary. We recommend using strong consistency.
34+
consistency: :strong
35+
36+
# max_retries specifies the number of times to attempt an operation before giving up.
37+
max_retries: 30
38+
39+
# retry_interval specifies the number of seconds to wait before retrying a single operation.
40+
retry_interval: 1
41+
42+
# The default timeout is 5, which is the time in seconds for an operation to time out.
43+
# We recommend 15 because it allows for plenty of time in most operating environments.
44+
# Mongoid doubles the configured value (known issue) so 15 results in a timeout of 30s.
45+
# Note that if you have a long-running query (over 30 seconds), it will time out.
46+
# See our example for long-running queries in the blog post referenced above.
47+
timeout: 15

0 commit comments

Comments
 (0)