Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:nkallen/querulous

  • Loading branch information...
commit 43dc48b37fdd0e03f157bc7ed63fd3edd8adce94 2 parents 7cd8570 + 6e24d96
Ed Ceaser authored
View
1  src/main/scala/com/twitter/querulous/Timeout.scala
@@ -3,6 +3,7 @@ package com.twitter.querulous
import java.util.{Timer, TimerTask}
import com.twitter.xrayspecs.Duration
+
class TimeoutException extends Exception
object Timeout {
View
3  src/main/scala/com/twitter/querulous/database/TimingOutDatabase.scala
@@ -33,7 +33,8 @@ class TimingOutDatabase(database: Database, dbhosts: List[String], dbname: Strin
database.close(conn)
}
} catch {
- case e: TimeoutException => throw new SqlDatabaseTimeoutException(dbhosts.mkString(",") + "/" + dbname)
+ case e: TimeoutException =>
+ throw new SqlDatabaseTimeoutException(dbhosts.mkString(",") + "/" + dbname)
}
}
View
3  src/main/scala/com/twitter/querulous/query/RetryingQuery.scala
@@ -3,6 +3,7 @@ package com.twitter.querulous.query
import java.sql.{SQLException, Connection}
import com.twitter.xrayspecs.Duration
+
class RetryingQueryFactory(queryFactory: QueryFactory, retries: Int) extends QueryFactory {
def apply(connection: Connection, query: String, params: Any*) = {
new RetryingQuery(queryFactory(connection, query, params: _*), retries)
@@ -16,7 +17,7 @@ class RetryingQuery(query: Query, retries: Int) extends QueryProxy(query) {
try {
f
} catch {
- case e: SQLException =>
+ case e: SQLException =>
if (retries > 1)
delegate(f, retries - 1)
else
Please sign in to comment.
Something went wrong with that request. Please try again.