mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -07:00
fix: add db to redis uri
This commit is contained in:
parent
2ed1702154
commit
9ea5fa80f8
1 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue