Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove apply override from TimingOutDatabaseFactory

  • Loading branch information...
commit 14f846ef1a5967c077c2516c5e7b6d8cd4e0819f 1 parent b3ab970
@freels freels authored
View
6 src/main/scala/com/twitter/querulous/database/TimingOutDatabase.scala
@@ -10,11 +10,9 @@ class SqlDatabaseTimeoutException(msg: String) extends SQLException(msg)
class TimingOutDatabaseFactory(databaseFactory: DatabaseFactory, poolSize: Int, queueSize: Int, openTimeout: Duration, initialTimeout: Duration, maxConnections: Int) extends DatabaseFactory {
def apply(dbhosts: List[String], dbname: String, username: String, password: String, urlOptions: String) = {
- new TimingOutDatabase(databaseFactory(dbhosts, dbname, username, password, urlOptions), dbhosts, dbname, poolSize, queueSize, openTimeout, initialTimeout, maxConnections)
- }
+ val dbLabel = if (dbname != null) dbname else "(null)"
- override def apply(dbhosts: List[String], username: String, password: String) = {
- new TimingOutDatabase(databaseFactory(dbhosts, username, password), dbhosts, "(null)", poolSize, queueSize, openTimeout, initialTimeout, maxConnections)
+ new TimingOutDatabase(databaseFactory(dbhosts, dbname, username, password, urlOptions), dbhosts, dbLabel, poolSize, queueSize, openTimeout, initialTimeout, maxConnections)
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.