Skip to content

Commit 6b195da

Browse files
committed
upgrade persistence dependencies
1 parent 070b6b6 commit 6b195da

File tree

7 files changed

+16
-26
lines changed

7 files changed

+16
-26
lines changed

api/src/main/scala/app/softnetwork/notification/api/AllNotificationsApi.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import app.softnetwork.notification.persistence.typed.{
1313
NotificationBehavior
1414
}
1515
import app.softnetwork.persistence.jdbc.query.{JdbcJournalProvider, JdbcOffsetProvider}
16+
import app.softnetwork.persistence.jdbc.schema.JdbcSchemaProvider
1617
import app.softnetwork.scheduler.config.SchedulerSettings
1718
import com.typesafe.config.Config
1819

19-
trait AllNotificationsApi extends NotificationApplication[Notification] {
20+
trait AllNotificationsApi extends NotificationApplication[Notification] with JdbcSchemaProvider {
2021

2122
override def notificationBehaviors: ActorSystem[_] => Seq[NotificationBehavior[Notification]] =
2223
_ => Seq(AllNotificationsBehavior)
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
package app.softnetwork.notification.api
22

3-
import akka.actor.{typed, ActorSystem}
4-
import app.softnetwork.persistence.jdbc.schema.PostgresSchemaProvider
5-
import app.softnetwork.persistence.schema.SchemaProvider
6-
import app.softnetwork.persistence.typed._
7-
import com.typesafe.config.Config
3+
import app.softnetwork.persistence.jdbc.schema.JdbcSchemaTypes
4+
import app.softnetwork.persistence.schema.SchemaType
85
import org.slf4j.{Logger, LoggerFactory}
96

107
object AllNotificationsPostgresLauncher extends AllNotificationsApi {
118

129
lazy val log: Logger = LoggerFactory getLogger getClass.getName
1310

14-
override def schemaProvider: typed.ActorSystem[_] => SchemaProvider = sys =>
15-
new PostgresSchemaProvider {
16-
override implicit def classicSystem: ActorSystem = sys
17-
override def config: Config = AllNotificationsPostgresLauncher.this.config
18-
}
11+
override val schemaType: SchemaType = JdbcSchemaTypes.Postgres
1912
}
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
package app.softnetwork.notification.api
22

3-
import akka.actor.{typed, ActorSystem}
4-
import app.softnetwork.persistence.jdbc.schema.PostgresSchemaProvider
5-
import app.softnetwork.persistence.schema.SchemaProvider
6-
import app.softnetwork.persistence.typed._
7-
import com.typesafe.config.Config
3+
import app.softnetwork.persistence.jdbc.schema.JdbcSchemaTypes
4+
import app.softnetwork.persistence.schema.SchemaType
85
import org.slf4j.{Logger, LoggerFactory}
96

107
object AllNotificationsWithSchedulerPostgresLauncher extends AllNotificationsWithSchedulerApi {
118

129
lazy val log: Logger = LoggerFactory getLogger getClass.getName
1310

14-
override def schemaProvider: typed.ActorSystem[_] => SchemaProvider = sys =>
15-
new PostgresSchemaProvider {
16-
override implicit def classicSystem: ActorSystem = sys
17-
override def config: Config = AllNotificationsWithSchedulerPostgresLauncher.this.config
18-
}
11+
override val schemaType: SchemaType = JdbcSchemaTypes.Postgres
1912
}

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ThisBuild / organization := "app.softnetwork"
3131

3232
name := "notification"
3333

34-
ThisBuild / version := "0.3.0"
34+
ThisBuild / version := "0.3.0.1"
3535

3636
ThisBuild / scalaVersion := "2.12.15"
3737

core/src/main/scala/app/softnetwork/notification/launch/NotificationApplication.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import akka.http.scaladsl.model.{HttpRequest, HttpResponse}
55
import app.softnetwork.api.server.launch.HealthCheckApplication
66
import app.softnetwork.notification.api.NotificationServiceApiHandler
77
import app.softnetwork.notification.model.Notification
8+
import app.softnetwork.persistence.schema.SchemaProvider
89

910
import scala.concurrent.Future
1011

1112
trait NotificationApplication[T <: Notification]
1213
extends HealthCheckApplication
13-
with NotificationGuardian[T] {
14+
with NotificationGuardian[T] { _: SchemaProvider =>
1415
override def grpcServices
1516
: ActorSystem[_] => Seq[PartialFunction[HttpRequest, Future[HttpResponse]]] = system =>
1617
notificationServers(system).map(

core/src/main/scala/app/softnetwork/notification/launch/NotificationGuardian.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ import app.softnetwork.notification.persistence.query.{
1010
import app.softnetwork.notification.persistence.typed.NotificationBehavior
1111
import app.softnetwork.persistence.launch.{PersistenceGuardian, PersistentEntity}
1212
import app.softnetwork.persistence.query.EventProcessorStream
13+
import app.softnetwork.persistence.schema.SchemaProvider
1314
import com.typesafe.scalalogging.StrictLogging
1415

1516
import scala.language.implicitConversions
1617

1718
trait NotificationGuardian[T <: Notification] extends PersistenceGuardian with StrictLogging {
19+
_: SchemaProvider =>
1820

1921
import app.softnetwork.persistence.launch.PersistenceGuardian._
2022

project/src/main/scala/app/softnetwork/sbt/build/Versions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package app.softnetwork.sbt.build
22

33
object Versions {
44

5-
val genericPersistence = "0.3.0.2"
5+
val genericPersistence = "0.3.0.3"
66

7-
val scheduler = "0.3.0"
7+
val scheduler = "0.3.0.1"
88

9-
val server = "0.3.0.2"
9+
val server = "0.3.0.3"
1010

1111
val scalatest = "3.1.1"
1212
}

0 commit comments

Comments
 (0)