Skip to content

Commit ad8d963

Browse files
committed
Fix bad spelling for did_lose_sqlserver_connection method name.
1 parent 0349faa commit ad8d963

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ By default all queries to the INFORMATION_SCHEMA table is silenced. If you think
107107

108108
==== Auto Connecting
109109

110-
By default the adapter will auto connect to lost DB connections. For every query it will retry at intervals of 2, 4, 8, 16 and 32 seconds. During each retry it will callback out to ActiveRecord::Base.did_retry_sqlserver_connection(connection,count). When all retries fail, it will callback to ActiveRecord::Base.did_loose_sqlserver_connection(connection). Both implementations of these methods are to write to the rails logger, however, they make great override points for notifications like Hoptoad. If you want to disable automatic reconnections use the following in an initializer.
110+
By default the adapter will auto connect to lost DB connections. For every query it will retry at intervals of 2, 4, 8, 16 and 32 seconds. During each retry it will callback out to ActiveRecord::Base.did_retry_sqlserver_connection(connection,count). When all retries fail, it will callback to ActiveRecord::Base.did_lose_sqlserver_connection(connection). Both implementations of these methods are to write to the rails logger, however, they make great override points for notifications like Hoptoad. If you want to disable automatic reconnections use the following in an initializer.
111111

112112
ActiveRecord::ConnectionAdapters::SQLServerAdapter.auto_connect = false
113113

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def self.did_retry_sqlserver_connection(connection,count)
3232
logger.info "CONNECTION RETRY: #{connection.class.name} retry ##{count}."
3333
end
3434

35-
def self.did_loose_sqlserver_connection(connection)
35+
def self.did_lose_sqlserver_connection(connection)
3636
logger.info "CONNECTION LOST: #{connection.class.name}"
3737
end
3838

@@ -774,7 +774,7 @@ def auto_reconnected?
774774
return true if reconnect!
775775
count += 1
776776
end
777-
ActiveRecord::Base.did_loose_sqlserver_connection(self)
777+
ActiveRecord::Base.did_lose_sqlserver_connection(self)
778778
false
779779
ensure
780780
@auto_connecting = false

0 commit comments

Comments
 (0)