Fix tracing span, using official mwbot crate
This commit is contained in:
631
Cargo.lock
generated
631
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "teachertracker-rs"
|
name = "teachertracker-rs"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["Lukas Wölfer <coding@thasky.one>"]
|
authors = ["Lukas Wölfer <coding@thasky.one>"]
|
||||||
description = "A MediaWiki bot that updates score information of teachers"
|
description = "A MediaWiki bot that updates score information of teachers"
|
||||||
@@ -13,7 +13,8 @@ categories = ["web-programming", "api-bindings", "automation"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4.41"
|
chrono = "0.4.41"
|
||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
mwbot = { git = "https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot.git", rev = "05cbb12188f18e2da710de158d89a9a4f1b42689", default-features = false, features = ["generators", "mwbot_derive"] }
|
# mwbot = { git = "https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot.git", rev = "05cbb12188f18e2da710de158d89a9a4f1b42689", default-features = false, features = ["generators", "mwbot_derive"] }
|
||||||
|
mwbot = { version = "0.7.0", default-features = false, features = ["generators", "mwbot_derive"] }
|
||||||
rand = "0.9.2"
|
rand = "0.9.2"
|
||||||
reqwest = "0.12.22"
|
reqwest = "0.12.22"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ async fn update_all_teachers(bot: &Bot) {
|
|||||||
tracing::info!("Updates all pages");
|
tracing::info!("Updates all pages");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip_all, fields(index))]
|
#[tracing::instrument(skip(page, wait_duration))]
|
||||||
async fn process_page(wait_duration: Duration, index: u32, page: mwbot::Page) {
|
async fn process_page(wait_duration: Duration, index: u32, page: mwbot::Page) {
|
||||||
tracing::info!("Next up");
|
tracing::info!("Next up");
|
||||||
sleep(wait_duration).await;
|
sleep(wait_duration).await;
|
||||||
|
|||||||
Reference in New Issue
Block a user