Skip to content

Commit

Permalink
small change for lorre not quiting after encountering an error (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkosecki authored Jan 28, 2021
1 parent dcb192b commit dc99151
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions conseil-common/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ akka {
# give more room for async response in head-of-line blocking on the same connection or other slow responses
response-entity-subscription-timeout: 60 seconds
}

# fixes the issue when lorre does not quit after system.shutdown()
coordinated-shutdown.run-by-actor-system-terminate = off

}

# Custom libSodium settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,18 @@ class TezosIndexer private (

override def start(): Unit = {
checkTezosConnection()
val accountResetsToHandle =
Await.result(
accountsResetHandler.unprocessedResetRequestLevels(lorreConf.chainEvents),
atMost = 5.seconds
)
mainLoop(0, accountResetsToHandle)
Await.result(
accountsResetHandler
.unprocessedResetRequestLevels(lorreConf.chainEvents)
.transform(
accountResets => mainLoop(0, accountResets),
error => {
logger.error("Could not get the unprocessed events block levels for this chain network", error)
error
}
),
Duration.Inf
)
}

override def stop(): Future[ShutdownComplete] = terminationSequence()
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object Dependencies {
val pureConfig = "0.10.2"
val scopt = "4.0.0-RC2"

val akka = "2.6.3"
val akka = "2.6.11"
val akkaHttp = "10.2.1"
val akkaHttpJson = "1.35.2"
val akkaHttpCors = "1.1.0"
Expand Down

0 comments on commit dc99151

Please sign in to comment.