Skip to content

Commit

Permalink
akka-loader: freezes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackmorse committed Jul 13, 2024
1 parent 7411ef9 commit 24ae75e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile_akka_loader
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ RUN sbt akkaLoader/assembly
FROM eclipse-temurin:11.0.21_9-jre-jammy
WORKDIR /app/
COPY --from=sources /app/akka-loader/target/scala-2.13/akka-loader-assembly-0.1.jar /app/
ENTRYPOINT ["java", "-Xmx6096m", "-Xms256m", "-jar", "/app/akka-loader-assembly-0.1.jar"]
ENTRYPOINT ["timeout", "4h", "java", "-Xmx6096m", "-Xms256m", "-jar", "/app/akka-loader-assembly-0.1.jar"]
4 changes: 4 additions & 0 deletions akka-loader/src/main/scala/LoaderApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ object LoaderApp extends App {
case e: Throwable =>
logger.error(e.getMessage, e)
actorSystem.terminate()

// clickhouse-scheduled may not be terminated
Thread.sleep(10000)
System.exit(0)
}

private def executorAndScheduler(entity: String, lastMatchesWindow: Int, executorActorFactory: ExecutorActorFactory, worldDetails: WorldDetails): (ActorRef, AbstractScheduler) = {
Expand Down

0 comments on commit 24ae75e

Please sign in to comment.