Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for timeouts.

  • Loading branch information...
commit 7e54ca57ccfe3803c25f664cc99b7edb5ffd0b09 1 parent 4b452a0
Robey Pointer authored
View
4 src/main/scala/com/twitter/querulous/database/TimingOutDatabase.scala
@@ -6,7 +6,7 @@ import com.twitter.xrayspecs.Duration
import net.lag.logging.Logger
-class SqlDatabaseTimeoutException(msg: String) extends SQLException(msg)
+class SqlDatabaseTimeoutException(msg: String, val timeout: Duration) 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) = {
@@ -34,7 +34,7 @@ class TimingOutDatabase(database: Database, dbhosts: List[String], dbname: Strin
}
} catch {
case e: TimeoutException =>
- throw new SqlDatabaseTimeoutException(dbhosts.mkString(",") + "/" + dbname)
+ throw new SqlDatabaseTimeoutException(dbhosts.mkString(",") + "/" + dbname, wait)
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.