fix: unreliable websocket functionality #144

Merged
talksik merged 6 commits from unreliable-websocket-infra into master 2026-04-12 17:00:12 +00:00
4 changed files with 11 additions and 13 deletions
Showing only changes of commit 11e1ef355e - Show all commits
+1 -6
View File
@@ -27,13 +27,8 @@ import (
"google.golang.org/grpc/credentials/insecure"
)
const (
// FIX: Use separate redis instance. We start with higher number because use this same instance in helios.
REDIS_DATABASE_FOR_AUTH int = 4
)
func redisForAuth() *redis.Client {
return internal.ConnectAndTestRedis(REDIS_DATABASE_FOR_AUTH)
return internal.ConnectAndTestRedis(db.RedisDBAuth)
}
func main() {
+2 -7
View File
@@ -21,11 +21,6 @@ import (
"google.golang.org/grpc"
)
const (
redisDBAuth = 4 // shared with orion for session validation
redisDBPusher = 5 // dedicated to pusher state (presence, pub/sub)
)
func main() {
port := utils.MustGetEnv("PORT")
grpcPort := utils.MustGetEnv("GRPC_PORT")
@@ -35,10 +30,10 @@ func main() {
defer db.Cleanup()
// Redis for auth session validation (same DB as orion)
authRedis := internal.ConnectAndTestRedis(redisDBAuth)
authRedis := internal.ConnectAndTestRedis(db.RedisDBAuth)
// Redis for pusher state (presence hashes, pub/sub)
pusherRedis := internal.ConnectAndTestRedis(redisDBPusher)
pusherRedis := internal.ConnectAndTestRedis(db.RedisDBPusher)
// Services
authSvc := auth.NewAuthService(authRedis, nil) // nil aeroSvc — pusher only calls GetSession
+8
View File
@@ -0,0 +1,8 @@
package db
// Shared database namespaces used across services
// FIX: Use separate redis instance. We start with higher number because use this same instance in helios.
const (
RedisDBAuth = 4 // auth sessions
RedisDBPusher = 5 // dedicated to pusher state (presence, pub/sub)
)