mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 23:37:54 +00:00
chore: bump deps
This commit is contained in:
parent
321ba0bb3d
commit
c8b6dc4c23
15 changed files with 152 additions and 335 deletions
|
|
@ -111,6 +111,8 @@ impl PKConfig {
|
|||
}
|
||||
}
|
||||
|
||||
// todo: consider passing this down instead of making it global
|
||||
// especially since we have optional discord/api/avatars/etc config
|
||||
lazy_static! {
|
||||
#[derive(Debug)]
|
||||
pub static ref CONFIG: Arc<PKConfig> = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use fred::pool::RedisPool;
|
||||
use fred::clients::RedisPool;
|
||||
use sqlx::postgres::{PgConnectOptions, PgPool, PgPoolOptions};
|
||||
use std::str::FromStr;
|
||||
use tracing::info;
|
||||
|
|
@ -8,13 +8,16 @@ pub mod types;
|
|||
|
||||
pub async fn init_redis() -> anyhow::Result<RedisPool> {
|
||||
info!("connecting to redis");
|
||||
let redis = fred::pool::RedisPool::new(
|
||||
let redis = RedisPool::new(
|
||||
fred::types::RedisConfig::from_url_centralized(crate::config.db.data_redis_addr.as_ref())
|
||||
.expect("redis url is invalid"),
|
||||
None,
|
||||
None,
|
||||
Some(Default::default()),
|
||||
10,
|
||||
)?;
|
||||
|
||||
let redis_handle = redis.connect(Some(fred::types::ReconnectPolicy::default()));
|
||||
let redis_handle = redis.connect_pool();
|
||||
tokio::spawn(async move { redis_handle });
|
||||
|
||||
Ok(redis)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue