refactor(sql-file): share import executor

This commit is contained in:
t8y2 committed 2026-05-31 11:58:15 +08:00
1 parent f5cc81f761
commit da6074caaa
8 files changed
+568 -845

No files matched your search

+2
View File
@@ -3,6 +3,7 @@ use std::collections::{HashMap, HashSet};
use std::path::PathBuf;
use std::sync::Arc;
use tokio::sync::{broadcast, Mutex, RwLock};
use tokio_util::sync::CancellationToken;
pub struct LoginRateLimit {
pub fail_count: u32,
@@ -15,6 +16,7 @@ pub struct WebState {
pub password_hash: RwLock<Option<String>>,
pub sessions: RwLock<HashSet<String>>,
pub sse_channels: RwLock<HashMap<String, broadcast::Sender<String>>>,
pub sql_file_executions: RwLock<HashMap<String, CancellationToken>>,
pub login_rate_limit: Mutex<LoginRateLimit>,
}