From 4cd2125323289eb73c2b1049d5fbb3e753aaebb8 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Thu, 11 Apr 2024 11:49:16 +0700 Subject: [PATCH] fix(auth_rust): acquire redis connection string from environment variable --- auth_rust/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_rust/src/main.rs b/auth_rust/src/main.rs index ec9f706..81d9413 100644 --- a/auth_rust/src/main.rs +++ b/auth_rust/src/main.rs @@ -227,7 +227,7 @@ fn main() -> Result<(), Box> { .build() .unwrap() .block_on(async { - let redis_client = Client::open("redis://@localhost:6379").unwrap(); + let redis_client = Client::open(env::var("REDIS_URL").unwrap_or("redis://@localhost:6379".to_string())).unwrap(); let redis_async_connection = redis_client.get_multiplexed_async_connection().await.unwrap(); let auth_repo = AuthRepo::new(redis_async_connection);