Last active
August 29, 2015 14:25
-
-
Save lucasmartins/ca626d0bfb9fdfcb6cc7 to your computer and use it in GitHub Desktop.
Through the Roof with Safety
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... code that builds the calls_hashes Array | |
# THIS CODE SPAWNS NEW MONGO CONNECTIONS | |
unless Rails.env.production? | |
line.calls.with(safe: true).create!(calls_hashes) | |
else | |
line.calls.with(write: {w: 'majority'}, safe: true).create!(calls_hashes) | |
end | |
# ... code that schedules map&reduce jobs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/mongoid/mongoid/issues/4128