Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
103b341488 | ||
| 6ef7401443 |
@@ -287,3 +287,8 @@
|
|||||||
### Features
|
### Features
|
||||||
|
|
||||||
* Add caching headers for env.js in Nginx configuration ([dbad818](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/dbad818fdaeb237a05f583e5402773a4339e7aa1))
|
* Add caching headers for env.js in Nginx configuration ([dbad818](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/dbad818fdaeb237a05f583e5402773a4339e7aa1))
|
||||||
|
## (2026-01-07)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add logging to Gateway for pod synchronization and startup events ([6ef7401](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/6ef74014430673e725245bf37e44c5b90b81abb3))
|
||||||
|
|||||||
Submodule knockoutwhistfrontend updated: d8b3904cbc...352b7fd3ff
@@ -4,6 +4,7 @@ import de.knockoutwhist.data.Pod
|
|||||||
import de.knockoutwhist.data.redis.RedisManager
|
import de.knockoutwhist.data.redis.RedisManager
|
||||||
import org.apache.pekko.actor.ActorSystem
|
import org.apache.pekko.actor.ActorSystem
|
||||||
import org.redisson.config.Config
|
import org.redisson.config.Config
|
||||||
|
import play.api.Logger
|
||||||
import play.api.inject.ApplicationLifecycle
|
import play.api.inject.ApplicationLifecycle
|
||||||
|
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
@@ -17,6 +18,8 @@ class Gateway @Inject()(
|
|||||||
actorSystem: ActorSystem
|
actorSystem: ActorSystem
|
||||||
)(implicit ec: ExecutionContext) {
|
)(implicit ec: ExecutionContext) {
|
||||||
|
|
||||||
|
private val logger = Logger(getClass.getName)
|
||||||
|
|
||||||
val redis: RedisManager = {
|
val redis: RedisManager = {
|
||||||
val config: Config = Config()
|
val config: Config = Config()
|
||||||
config.useSingleServer.setAddress("valkey://" + sys.env.getOrElse("VALKEY_HOST", "localhost") + ":" + sys.env.getOrElse("VALKEY_PORT", "6379"))
|
config.useSingleServer.setAddress("valkey://" + sys.env.getOrElse("VALKEY_HOST", "localhost") + ":" + sys.env.getOrElse("VALKEY_PORT", "6379"))
|
||||||
@@ -24,8 +27,11 @@ class Gateway @Inject()(
|
|||||||
}
|
}
|
||||||
|
|
||||||
redis.continuousSyncPod(() => {
|
redis.continuousSyncPod(() => {
|
||||||
|
logger.info("Syncing pod with Redis")
|
||||||
createPod()
|
createPod()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
logger.info("Gateway started")
|
||||||
|
|
||||||
def syncPod(): Unit = {
|
def syncPod(): Unit = {
|
||||||
redis.syncPod(createPod())
|
redis.syncPod(createPod())
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package modules
|
package modules
|
||||||
|
|
||||||
import com.google.inject.AbstractModule
|
import com.google.inject.AbstractModule
|
||||||
|
import logic.Gateway
|
||||||
|
|
||||||
class GatewayModule extends AbstractModule {
|
class GatewayModule extends AbstractModule {
|
||||||
override def configure(): Unit = {
|
override def configure(): Unit = {
|
||||||
bind(classOf[GatewayModule]).asEagerSingleton()
|
bind(classOf[Gateway]).asEagerSingleton()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
MAJOR=4
|
MAJOR=4
|
||||||
MINOR=20
|
MINOR=21
|
||||||
PATCH=0
|
PATCH=0
|
||||||
|
|||||||
Reference in New Issue
Block a user