pjfanning commented on code in PR #167:
URL: https://github.com/apache/pekko-projection/pull/167#discussion_r1637956754


##########
slick/src/main/scala/org/apache/pekko/projection/slick/internal/SlickOffsetStore.scala:
##########
@@ -35,23 +35,27 @@ import pekko.projection.jdbc.internal.MySQLDialect
 import pekko.projection.jdbc.internal.OracleDialect
 import pekko.projection.jdbc.internal.PostgresDialect
 import pekko.util.Helpers.toRootLowerCase
+import slick.basic.DatabaseConfig
 import slick.jdbc.JdbcProfile
 
 /**
  * INTERNAL API
  */
 @InternalApi private[projection] class SlickOffsetStore[P <: JdbcProfile](
     system: ActorSystem[_],
-    val db: P#Backend#Database,
-    val profile: P,
+    databaseConfig: DatabaseConfig[P],
     slickSettings: SlickSettings,
     clock: Clock) {
+
+  def this(system: ActorSystem[_], databaseConfig: DatabaseConfig[P], 
slickSettings: SlickSettings) =
+    this(system, databaseConfig, slickSettings, Clock.systemUTC())
+
+  private[projection] val profile: P = databaseConfig.profile
+  private val db = databaseConfig.db

Review Comment:
   I've created https://github.com/apache/pekko-projection/discussions/168 
   * this PR does not introduce the db close issue - it is a pre-existing issue
   * it is also a complicated pre-existing issue - and I believe that there is 
no simple solution
   * I do believe that the issue should be fixed separately and not bundled 
into this PR



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to