acts_next/
config.rs

1#[derive(Debug, Clone)]
2pub struct Config {
3    pub cache_cap: usize,
4    pub log_dir: String,
5    pub log_level: String,
6    pub data_dir: String,
7    pub db_name: String,
8    pub tick_interval_secs: u64,
9
10    // will delete message after the max retries
11    // cancel the settings by setting to 0
12    pub max_message_retry_times: i32,
13    // do not remove process and tasks on complete
14    pub keep_processes: bool,
15}
16
17impl Default for Config {
18    fn default() -> Self {
19        Self {
20            cache_cap: 1024,
21            log_dir: "log".to_string(),
22            data_dir: "data".to_string(),
23            db_name: "acts.db".to_string(),
24            log_level: "INFO".to_string(),
25
26            // default to 15s
27            tick_interval_secs: 15,
28            max_message_retry_times: 20,
29            keep_processes: false,
30        }
31    }
32}