feat: Add logging to Gateway for pod synchronization and startup events

This commit is contained in:
2026-01-07 15:04:46 +01:00
parent 103b341488
commit 26157076d6
3 changed files with 38 additions and 3 deletions

View File

@@ -22,12 +22,14 @@ class Gateway @Inject()(
val redis: RedisManager = {
val config: Config = Config()
config.useSingleServer.setAddress("valkey://" + sys.env.getOrElse("VALKEY_HOST", "localhost") + ":" + sys.env.getOrElse("VALKEY_PORT", "6379"))
val url = "valkey://" + sys.env.getOrElse("VALKEY_HOST", "localhost") + ":" + sys.env.getOrElse("VALKEY_PORT", "6379")
logger.info(s"Connecting to Valkey at $url")
config.useSingleServer.setAddress(url)
RedisManager(config)
}
redis.continuousSyncPod(() => {
logger.info("Syncing pod with Redis")
logger.info("Syncing pod with Valkey")
createPod()
})