1 Commits

Author SHA1 Message Date
Lukas Wölfer
d999f676ba Fix tracing span, using official mwbot crate 2025-09-03 02:18:33 +02:00
3 changed files with 198 additions and 440 deletions

631
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package]
name = "teachertracker-rs"
version = "0.1.2"
version = "0.1.3"
edition = "2024"
authors = ["Lukas Wölfer <coding@thasky.one>"]
description = "A MediaWiki bot that updates score information of teachers"
@@ -13,7 +13,8 @@ categories = ["web-programming", "api-bindings", "automation"]
[dependencies]
chrono = "0.4.41"
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"
reqwest = "0.12.22"
serde = { version = "1.0.219", features = ["derive"] }

View File

@@ -25,7 +25,7 @@ async fn update_all_teachers(bot: &Bot) {
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) {
tracing::info!("Next up");
sleep(wait_duration).await;