minor: cleanup unused variables + methods

This commit is contained in:
Tyler Brock 2012-02-17 15:18:02 -05:00
parent a57762c797
commit 95d1129e75
2 changed files with 1 additions and 9 deletions

View File

@ -407,10 +407,6 @@ module Mongo
end end
alias :reconnect :connect alias :reconnect :connect
def connecting?
@nodes_to_try.length > 0
end
# It's possible that we defined connected as all nodes being connected??? # It's possible that we defined connected as all nodes being connected???
# NOTE: Do check if this needs to be more stringent. # NOTE: Do check if this needs to be more stringent.
# Probably not since if any node raises a connection failure, all nodes will be closed. # Probably not since if any node raises a connection failure, all nodes will be closed.

View File

@ -20,7 +20,6 @@ module Mongo
# Instantiates and manages connections to a MongoDB replica set. # Instantiates and manages connections to a MongoDB replica set.
class ReplSetConnection < Connection class ReplSetConnection < Connection
CLEANUP_INTERVAL = 300
attr_reader :replica_set_name, :seeds, :refresh_interval, :refresh_mode, attr_reader :replica_set_name, :seeds, :refresh_interval, :refresh_mode,
:refresh_version :refresh_version
@ -107,13 +106,11 @@ module Mongo
# TODO: add a method for replacing this list of node. # TODO: add a method for replacing this list of node.
@seeds.freeze @seeds.freeze
# TODO: get rid of this
@nodes = @seeds.dup
# Refresh # Refresh
@refresh_mode = opts.fetch(:refresh_mode, false) @refresh_mode = opts.fetch(:refresh_mode, false)
@refresh_interval = opts[:refresh_interval] || 90 @refresh_interval = opts[:refresh_interval] || 90
@last_refresh = Time.now @last_refresh = Time.now
@refresh_version = 0
# No connection manager by default. # No connection manager by default.
@manager = nil @manager = nil
@ -139,7 +136,6 @@ module Mongo
end end
@connected = false @connected = false
@refresh_version = 0
# Replica set name # Replica set name
if opts[:rs_name] if opts[:rs_name]