Skip to content

Commit 2dc1d63

Browse files
committed
migrate to scheduler v 0.1.4
1 parent 375b21e commit 2dc1d63

File tree

10 files changed

+20
-13
lines changed

10 files changed

+20
-13
lines changed

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.1.6.1"
34+
ThisBuild / version := "0.1.6.2"
3535

3636
ThisBuild / scalaVersion := "2.12.15"
3737

core/src/main/scala/app/softnetwork/notification/persistence/query/Scheduler2NotificationProcessorStream.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ trait Scheduler2NotificationProcessorStream
1515
extends Scheduler2EntityProcessorStream[NotificationCommand, NotificationCommandResult] {
1616
_: JournalProvider with NotificationHandler =>
1717

18-
protected val forTests = false
19-
2018
override protected def triggerSchedule(schedule: Schedule): Future[Boolean] = {
2119
!?(TriggerSchedule4Notification(schedule)) map {
2220
case result: Schedule4NotificationTriggered =>

core/src/main/scala/app/softnetwork/notification/persistence/typed/NotificationBehavior.scala

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ trait NotificationBehavior[T <: Notification]
102102
notificationTimerKey,
103103
delay,
104104
Some(true),
105-
Some(now())
105+
Some(now()),
106+
None
106107
)
107108
)
108109
)
@@ -239,7 +240,15 @@ trait NotificationBehavior[T <: Notification]
239240
) {
240241
ScheduleForNotificationAdded(
241242
AddSchedule(
242-
Schedule(persistenceId, entityId, notificationTimerKey, delay, Some(true), Some(now()))
243+
Schedule(
244+
persistenceId,
245+
entityId,
246+
notificationTimerKey,
247+
delay,
248+
Some(true),
249+
Some(now()),
250+
None
251+
)
243252
)
244253
)
245254
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ object Versions {
44

55
val genericPersistence = "0.2.5.15"
66

7-
val scheduler = "0.1.3"
7+
val scheduler = "0.1.4"
88

99
val server = "0.2.6.2"
1010

testkit/src/main/scala/app/softnetwork/notification/scalatest/AllNotificationsTestKit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ trait AllNotificationsTestKit
8686
with AllNotificationsHandler
8787
with InMemoryJournalProvider {
8888
override val tag: String = s"${AllNotificationsBehavior.persistenceId}-scheduler"
89-
override protected val forTests: Boolean = true
89+
override val forTests: Boolean = true
9090
override implicit def system: ActorSystem[_] = sys
9191
}
9292
)

testkit/src/main/scala/app/softnetwork/notification/scalatest/ApnsNotificationsTestKit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ trait ApnsNotificationsTestKit
5959
with ApnsNotificationsHandler
6060
with InMemoryJournalProvider {
6161
override val tag: String = s"${ApnsNotificationsBehavior.persistenceId}-scheduler"
62-
override protected val forTests: Boolean = true
62+
override val forTests: Boolean = true
6363
override implicit def system: ActorSystem[_] = sys
6464
}
6565
)

testkit/src/main/scala/app/softnetwork/notification/scalatest/FcmAndApnsNotificationsTestKit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ trait FcmAndApnsNotificationsTestKit
6363
with InMemoryJournalProvider {
6464
override val tag: String =
6565
s"${FcmAndApnsNotificationsBehavior.persistenceId}-scheduler"
66-
override protected val forTests: Boolean = true
66+
override val forTests: Boolean = true
6767
override implicit def system: ActorSystem[_] = sys
6868
}
6969
)

testkit/src/main/scala/app/softnetwork/notification/scalatest/FcmNotificationsTestKit.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import app.softnetwork.notification.persistence.typed.{
1818
}
1919
import app.softnetwork.notification.spi.FcmMockProvider
2020
import app.softnetwork.persistence.query.InMemoryJournalProvider
21-
import com.typesafe.config.{Config, ConfigFactory}
21+
import com.typesafe.config.Config
2222
import org.scalatest.Suite
2323
import org.softnetwork.notification.model.Push
2424

@@ -40,7 +40,7 @@ trait FcmNotificationsTestKit extends NotificationGrpcServer[Push] with Notifica
4040
with FcmNotificationsHandler
4141
with InMemoryJournalProvider {
4242
override val tag: String = s"${FcmNotificationsBehavior.persistenceId}-scheduler"
43-
override protected val forTests: Boolean = true
43+
override val forTests: Boolean = true
4444
override implicit def system: ActorSystem[_] = sys
4545
}
4646
)

testkit/src/main/scala/app/softnetwork/notification/scalatest/SMSModeNotificationsTestKit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ trait SMSModeNotificationsTestKit
6060
with SMSModeNotificationsHandler
6161
with InMemoryJournalProvider {
6262
override val tag: String = s"${SMSModeNotificationsBehavior.persistenceId}-scheduler"
63-
override protected val forTests: Boolean = true
63+
override val forTests: Boolean = true
6464
override implicit def system: ActorSystem[_] = sys
6565
}
6666
)

testkit/src/main/scala/app/softnetwork/notification/scalatest/SimpleMailNotificationsTestKit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ trait SimpleMailNotificationsTestKit
6161
with SimpleMailNotificationsHandler
6262
with InMemoryJournalProvider {
6363
override val tag: String = s"${SimpleMailNotificationsBehavior.persistenceId}-scheduler"
64-
override protected val forTests: Boolean = true
64+
override val forTests: Boolean = true
6565
override implicit def system: ActorSystem[_] = sys
6666
}
6767
)

0 commit comments

Comments
 (0)