diff --git a/sgl-router/Cargo.toml b/sgl-router/Cargo.toml index ad88ab760..7287d7354 100644 --- a/sgl-router/Cargo.toml +++ b/sgl-router/Cargo.toml @@ -25,7 +25,6 @@ dashmap = "6.1.0" http = "1.1.0" tokio = { version = "1.42.0", features = ["full"] } async-trait = "0.1" -once_cell = "1.21" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "chrono"] } tracing-log = "0.2" diff --git a/sgl-router/src/core/worker.rs b/sgl-router/src/core/worker.rs index 12cf3b751..9f865fa8f 100644 --- a/sgl-router/src/core/worker.rs +++ b/sgl-router/src/core/worker.rs @@ -1,14 +1,13 @@ use super::{WorkerError, WorkerResult}; use async_trait::async_trait; use futures; -use once_cell::sync::Lazy; use serde_json; use std::fmt; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; -use std::sync::Arc; +use std::sync::{Arc, LazyLock}; // Shared HTTP client for worker operations (health checks, server info, etc.) -static WORKER_CLIENT: Lazy = Lazy::new(|| { +static WORKER_CLIENT: LazyLock = LazyLock::new(|| { reqwest::Client::builder() .timeout(std::time::Duration::from_secs(30)) // Default timeout, overridden per request .build()