Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor mongodb ops tweak.

  • Loading branch information...
commit 34348e0ff36345bcda35476eea9f1bf10183dcbb 1 parent 45f76a1
@jnunemaker authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 mongodb/mongodb_ops.rb
View
4 mongodb/mongodb_ops.rb
@@ -14,9 +14,7 @@ def build_report
config = YAML::load_file(option('path_to_db_yml'))[option('rails_env')]
connection = Mongo::Connection.new(config['host'], config['port'])
db = connection.db(config['database'])
- unless config['username'].nil?
- db.authenticate(config['username'], config['password'])
- end
+ db.authenticate(config['username'], config['password']) unless config['username'].nil?
stats = db.command('serverStatus' => 1)
op_inserts = stats['opcounters']['insert']
Please sign in to comment.
Something went wrong with that request. Please try again.