chore: bump deps

This commit is contained in:
alyssa 2024-11-01 06:32:40 +09:00
parent 321ba0bb3d
commit c8b6dc4c23
15 changed files with 152 additions and 335 deletions

View file

@ -5,24 +5,22 @@ edition = "2021"
[dependencies]
anyhow = { workspace = true }
config = "0.14.0"
fred = { workspace = true }
gethostname = "0.4.1"
lazy_static = { workspace = true }
metrics = { workspace = true }
metrics-exporter-prometheus = { version = "0.15.3", default-features = false, features = ["tokio", "http-listener", "tracing"] }
prost = { workspace = true }
prost-types = { workspace = true }
serde = { workspace = true }
sqlx = { workspace = true }
time = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-gelf = "0.7.1"
tracing-subscriber = { workspace = true}
twilight-model = { workspace = true }
uuid = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
config = "0.14.0"
metrics-exporter-prometheus = { version = "0.15.3", default-features = false, features = ["tokio", "http-listener", "tracing"] }
[build-dependencies]
prost-build = { workspace = true }

View file

@ -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> = {

View file

@ -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)