update code level
This commit is contained in:
@@ -7,6 +7,7 @@ pub struct Config {
|
||||
pub database: DatabaseConfig,
|
||||
pub server: ServerConfig,
|
||||
pub storage: StorageConfig,
|
||||
pub queue: QueueConfig,
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +28,14 @@ pub struct StorageConfig {
|
||||
pub thumbnails_dir: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct QueueConfig {
|
||||
pub max_concurrent_tasks: usize,
|
||||
pub queue_size_limit: usize,
|
||||
pub high_request_rate_threshold: f64,
|
||||
pub idle_request_rate_threshold: f64,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn load() -> Result<Self, config::ConfigError> {
|
||||
let config = config::Config::builder()
|
||||
|
||||
Reference in New Issue
Block a user