Permalink
Browse files

Minor mongodb ops tweak.

  • Loading branch information...
1 parent 45f76a1 commit 34348e0ff36345bcda35476eea9f1bf10183dcbb @jnunemaker committed Jul 14, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 mongodb/mongodb_ops.rb
View
@@ -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']

0 comments on commit 34348e0

Please sign in to comment.