This commit is contained in:
lychang
2026-07-19 15:03:13 +08:00
parent f5336a4ea2
commit b915e69222
16 changed files with 332 additions and 2032 deletions

View File

@@ -3,7 +3,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicU64, AtomicBool};
use std::time::{Duration, Instant};
use tokio::sync::Notify;
use tracing::{info, debug};
use tracing::info;
/// 队列统计信息
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -34,7 +34,7 @@ impl TaskQueue {
}
}
pub fn new_with_db(_max_concurrent_tasks: usize, _queue_size_limit: usize, _high_request_rate_threshold: f64, _idle_request_rate_threshold: f64, _db: Arc<crate::database::Database>) -> Self {
pub fn new_with_db(_max_concurrent_tasks: usize, _queue_size_limit: usize, _high_request_rate_threshold: f64, _idle_request_rate_threshold: f64, _db: Arc<crate::db::Database>) -> Self {
Self {
// HTTP请求频率监控
request_count: AtomicU64::new(0),