From 5291fd4f10f032ce00a423773f2f7fc9a29404a2 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Mon, 10 Jul 2023 03:54:28 -0400 Subject: [PATCH] fix: add db to redis uri --- packages/backend/native-utils/migration/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/native-utils/migration/src/main.rs b/packages/backend/native-utils/migration/src/main.rs index a7b649c51b..896f1ed597 100644 --- a/packages/backend/native-utils/migration/src/main.rs +++ b/packages/backend/native-utils/migration/src/main.rs @@ -44,12 +44,12 @@ async fn main() { }; let redis_uri_userpass = match redis_conf.user { None => "".to_string(), - Some(user) => format!("{}:{}@", user, redis_conf.pass.unwrap_or_default()), + Some(user) => format!("{}:{}@", user, encode(&redis_conf.pass.unwrap_or_default())), }; let redis_uri_hostport = format!("{}:{}", redis_conf.host, redis_conf.port); let redis_uri = format!( - "{}://{}{}", - redis_proto, redis_uri_userpass, redis_uri_hostport + "{}://{}{}/{}", + redis_proto, redis_uri_userpass, redis_uri_hostport, redis_conf.db ); env::set_var(CACHE_URL_ENV, redis_uri); env::set_var(