Skip to content

Commit b8e4c53

Browse files
mfirryNateBrady23
authored andcommitted
Play2-anorm: version bump => 2.5.14 (#2723)
1 parent fe44419 commit b8e4c53

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

frameworks/Scala/play2-scala/play2-scala-anorm/app/utils/DbOperation.scala

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ import java.sql.Connection
44
import java.util.concurrent._
55
import javax.inject.{Singleton, Inject}
66
import play.api.db.Database
7-
import play.api.Play.current
7+
import play.api.Configuration
88
import play.core.NamedThreadFactory
99
import play.db.NamedDatabase
1010
import scala.concurrent._
1111
import scala.concurrent.Future
1212

1313
@Singleton
14-
class DbOperation @Inject()(@NamedDatabase("hello_world") protected val db: Database) {
14+
class DbOperation @Inject() (@NamedDatabase("hello_world") protected val db: Database,
15+
configuration: Configuration) {
1516

16-
private val maxDbOperations = current.configuration.underlying.getInt("max-db-ops")
17+
private val maxDbOperations = configuration.underlying.getInt("max-db-ops")
1718

18-
private val partitionCount = current.configuration.getInt("db.hello_world.partitionCount").getOrElse(2)
19+
private val partitionCount = configuration.getInt("db.hello_world.partitionCount").getOrElse(2)
1920
private val maxConnections =
20-
partitionCount * current.configuration.getInt("db.hello_world.maxConnectionsPerPartition").getOrElse(5)
21+
partitionCount * configuration.getInt("db.hello_world.maxConnectionsPerPartition").getOrElse(5)
2122
private val minConnections =
22-
partitionCount * current.configuration.getInt("db.hello_world.minConnectionsPerPartition").getOrElse(5)
23+
partitionCount * configuration.getInt("db.hello_world.minConnectionsPerPartition").getOrElse(5)
2324

2425
private val tpe = new ThreadPoolExecutor(minConnections, maxConnections,
2526
0L, TimeUnit.MILLISECONDS,
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.9
1+
sbt.version=0.13.11
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
// Comment to get more information during initialization
2+
logLevel := Level.Warn
3+
14
// Use the Play sbt plugin for Play projects
2-
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")
5+
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.14")

0 commit comments

Comments
 (0)