Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 2ceec42

Browse files
committed
Update crates
1 parent 9cdcf21 commit 2ceec42

File tree

10 files changed

+251
-315
lines changed

10 files changed

+251
-315
lines changed

Cargo.lock

Lines changed: 186 additions & 264 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ csv = "1"
4848
url = "2"
4949
num = "0.4"
5050
hex = "0.4"
51+
http = "1"
5152
stfu = "0.1"
5253
time = "0.3"
5354
rand = "0.9"
@@ -63,11 +64,11 @@ fluent = "0.16"
6364
base64 = "0.22"
6465
dashmap = "6"
6566
futures = "0.3"
66-
secrecy = "0.8"
67+
secrecy = "0.10"
6768
num_cpus = "1"
6869
indexmap = "2"
6970
bitflags = "2"
70-
deadpool = "0.11"
71+
deadpool = "0.12"
7172
once_cell = "1"
7273
byteorder = "1"
7374
rmp-serde = "1"
@@ -86,28 +87,28 @@ dasp_signal = "0.11"
8687
serde_derive = "1"
8788
futures-util = "0.3"
8889
intl-memoizer = "0.5"
89-
deadpool-redis = "0.15"
90+
deadpool-redis = "0.20"
9091
futures-channel = "0.3"
9192
small-fixed-array = "0.4"
9293
prometheus-static-metric = "0.5"
9394

9495
# additional config deps
95-
axum = { version = "0.7", features = ["json"] }
96-
uuid = { version = "1", features = ["rand", "v4"] }
97-
fern = { version = "0.6", features = ["colored"] }
96+
axum = { version = "0.8", features = ["json"] }
97+
uuid = { version = "1", features = ["rng-rand", "v4"] }
98+
fern = { version = "0.7", features = ["colored"] }
9899
serde = { version = "1", features = ["derive"] }
99-
redis = { version = "0.25", features = ["tokio-rustls"] }
100+
redis = { version = "0.29", features = ["tokio-rustls-comp"] }
100101
tracing = { version = "0.1", features = ["log"] }
101102
aes-gcm = { version = "0.10", features = ["std"] }
102103
typesize = { version = "0.1", features = ["details"] }
103-
prometheus = { version = "0.13", features = ["process"] }
104+
prometheus = { version = "0.14", features = ["process"] }
104105
audiopus_sys = { version = "0.2", features = ["static"] }
105-
tokio-metrics = { version = "0.3", features = ["rt"] }
106-
async-tempfile = { version = "0.5", features = ["uuid"] }
106+
tokio-metrics = { version = "0.4", features = ["rt"] }
107+
async-tempfile = { version = "0.7", features = ["uuid"] }
107108
dasp_interpolate = { version = "0.11", features = ["linear"] }
108109
tokio = { version = "1", features = ["parking_lot", "signal", "rt-multi-thread"] }
109110
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
110-
sqlx = { version = "0.7", features = ["postgres", "macros", "migrate", "runtime-tokio-rustls", "time"] }
111+
sqlx = { version = "0.8", features = ["postgres", "macros", "migrate", "runtime-tokio-rustls", "time"] }
111112

112113
# git deps
113114
scripty-common = { git = "https://github.com/scripty-bot/scripty-common" }
@@ -131,12 +132,3 @@ serenity = { git = "https://github.com/serenity-rs/serenity", branch = "next", f
131132
"typesize",
132133
"transport_compression_zstd"
133134
] }
134-
135-
136-
[patch.crates-io]
137-
serenity = { git = "https://github.com/serenity-rs/serenity", branch = "next" }
138-
songbird = { git = "https://github.com/serenity-rs/songbird", branch = "serenity-next" }
139-
140-
[patch.crates-io.serenity-voice-model]
141-
git = "https://github.com/serenity-rs/serenity"
142-
branch = "current"

scripty_bot_utils/src/entity_block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub async fn init_blocked() -> Result<(), scripty_redis::redis::RedisError> {
3131
}
3232
blocked_user_pipe
3333
.ignore()
34-
.query_async::<_, ()>(&mut redis_pool)
34+
.query_async::<()>(&mut redis_pool)
3535
.await?;
3636
}
3737

@@ -52,7 +52,7 @@ pub async fn init_blocked() -> Result<(), scripty_redis::redis::RedisError> {
5252

5353
blocked_guild_pipe
5454
.ignore()
55-
.query_async::<_, ()>(&mut redis_pool)
55+
.query_async::<()>(&mut redis_pool)
5656
.await?;
5757
}
5858

scripty_metrics/src/metrics.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ make_static_metric! {
102102
}
103103

104104
pub label_enum RuntimeMetrics {
105+
blocking_queue_depth,
106+
blocking_threads_count,
107+
budget_forced_yield_count,
108+
elapsed,
109+
global_queue_depth,
110+
idle_blocking_threads_count,
111+
io_driver_ready_count,
112+
live_tasks_count,
105113
workers_count,
106114
total_park_count,
107115
max_park_count,
@@ -131,13 +139,9 @@ make_static_metric! {
131139
total_busy_duration,
132140
max_busy_duration,
133141
min_busy_duration,
134-
injection_queue_depth,
135142
total_local_queue_depth,
136143
max_local_queue_depth,
137144
min_local_queue_depth,
138-
elapsed,
139-
budget_forced_yield_count,
140-
io_driver_ready_count,
141145
}
142146
pub struct RuntimeMetricsVec: IntGauge {
143147
"runtime_metrics" => RuntimeMetrics,

scripty_metrics/src/rt_metrics.rs

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ pub fn register_metrics(handle: &tokio::runtime::Handle) {
2020
for interval in monitor.intervals() {
2121
trace!("runtime metrics: {:?}", interval);
2222
let RuntimeMetrics {
23+
blocking_queue_depth,
24+
blocking_threads_count,
25+
budget_forced_yield_count,
26+
elapsed,
27+
global_queue_depth,
28+
idle_blocking_threads_count,
29+
io_driver_ready_count,
30+
live_tasks_count,
2331
workers_count,
2432
total_park_count,
2533
max_park_count,
@@ -49,15 +57,30 @@ pub fn register_metrics(handle: &tokio::runtime::Handle) {
4957
total_busy_duration,
5058
max_busy_duration,
5159
min_busy_duration,
52-
injection_queue_depth,
5360
total_local_queue_depth,
5461
max_local_queue_depth,
5562
min_local_queue_depth,
56-
elapsed,
57-
budget_forced_yield_count,
58-
io_driver_ready_count,
5963
..
6064
} = interval;
65+
m.runtime_metrics
66+
.blocking_queue_depth
67+
.set(blocking_queue_depth as i64);
68+
m.runtime_metrics
69+
.blocking_threads_count
70+
.set(blocking_threads_count as i64);
71+
m.runtime_metrics
72+
.budget_forced_yield_count
73+
.set(budget_forced_yield_count as i64);
74+
m.runtime_metrics.elapsed.set(elapsed.as_nanos() as i64);
75+
m.runtime_metrics
76+
.global_queue_depth
77+
.set(global_queue_depth as i64);
78+
m.runtime_metrics
79+
.idle_blocking_threads_count
80+
.set(idle_blocking_threads_count as i64);
81+
m.runtime_metrics
82+
.live_tasks_count
83+
.set(live_tasks_count as i64);
6184
m.runtime_metrics.workers_count.set(workers_count as i64);
6285
m.runtime_metrics
6386
.total_park_count
@@ -135,9 +158,6 @@ pub fn register_metrics(handle: &tokio::runtime::Handle) {
135158
m.runtime_metrics
136159
.min_busy_duration
137160
.set(min_busy_duration.as_nanos() as i64);
138-
m.runtime_metrics
139-
.injection_queue_depth
140-
.set(injection_queue_depth as i64);
141161
m.runtime_metrics
142162
.total_local_queue_depth
143163
.set(total_local_queue_depth as i64);
@@ -147,10 +167,6 @@ pub fn register_metrics(handle: &tokio::runtime::Handle) {
147167
m.runtime_metrics
148168
.min_local_queue_depth
149169
.set(min_local_queue_depth as i64);
150-
m.runtime_metrics.elapsed.set(elapsed.as_nanos() as i64);
151-
m.runtime_metrics
152-
.budget_forced_yield_count
153-
.set(budget_forced_yield_count as i64);
154170
m.runtime_metrics
155171
.io_driver_ready_count
156172
.set(io_driver_ready_count as i64);

scripty_webserver/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ homepage.workspace = true
77
repository.workspace = true
88

99
[dependencies]
10+
axum.workspace = true
1011
time.workspace = true
11-
tracing.workspace = true
12-
serde_json.workspace = true
12+
sqlx.workspace = true
1313
serde.workspace = true
1414
tokio.workspace = true
15-
axum.workspace = true
16-
sqlx.workspace = true
15+
tracing.workspace = true
16+
serde_json.workspace = true
1717

1818
scripty_db = { path = "../scripty_db" }
1919
scripty_i18n = { path = "../scripty_i18n" }

scripty_webserver/src/auth.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub struct Authentication {
1515
pub user_id: u64,
1616
}
1717

18-
#[axum::async_trait]
1918
impl<S> FromRequestParts<S> for Authentication
2019
where
2120
S: Send + Sync,

scripty_webserver/src/endpoints/webhooks/discordservices_net.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use axum::{
22
Json,
3-
async_trait,
43
extract::FromRequestParts,
54
http::{StatusCode, request::Parts},
65
};
@@ -10,8 +9,10 @@ use scripty_botlists::discordservices_net::{Bot, DiscordServicesNetIncomingWebho
109
use crate::errors::WebServerError;
1110

1211
pub struct DiscordServicesNetAuthorization;
13-
#[async_trait]
14-
impl<S> FromRequestParts<S> for DiscordServicesNetAuthorization {
12+
impl<S> FromRequestParts<S> for DiscordServicesNetAuthorization
13+
where
14+
S: Send + Sync,
15+
{
1516
type Rejection = (StatusCode, &'static str);
1617

1718
async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result<Self, Self::Rejection> {

scripty_webserver/src/endpoints/webhooks/top_gg.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use axum::{
22
Json,
3-
async_trait,
43
extract::FromRequestParts,
54
http::{StatusCode, request::Parts},
65
};
@@ -10,8 +9,10 @@ use scripty_botlists::top_gg::IncomingWebhook;
109
use crate::errors::WebServerError;
1110

1211
pub struct TopGgAuthorization;
13-
#[async_trait]
14-
impl<S> FromRequestParts<S> for TopGgAuthorization {
12+
impl<S> FromRequestParts<S> for TopGgAuthorization
13+
where
14+
S: Send + Sync,
15+
{
1516
type Rejection = (StatusCode, &'static str);
1617

1718
async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result<Self, Self::Rejection> {

scripty_webserver/src/endpoints/webhooks/wumpus_store.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use axum::{
22
Json,
3-
async_trait,
43
extract::FromRequestParts,
54
http::{StatusCode, request::Parts},
65
};
@@ -10,8 +9,10 @@ use scripty_botlists::wumpus_store::IncomingWebhook;
109
use crate::errors::WebServerError;
1110

1211
pub struct WumpusStoreAuthorization;
13-
#[async_trait]
14-
impl<S> FromRequestParts<S> for WumpusStoreAuthorization {
12+
impl<S> FromRequestParts<S> for WumpusStoreAuthorization
13+
where
14+
S: Send + Sync,
15+
{
1516
type Rejection = (StatusCode, &'static str);
1617

1718
async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result<Self, Self::Rejection> {

0 commit comments

Comments
 (0)