chore: change run_monitor to struct function
This commit is contained in:
parent
07105a7d17
commit
ef6aaf8bbc
@ -8,10 +8,7 @@ use app_env::{
|
||||
appdata::AppData,
|
||||
config::{Config}
|
||||
};
|
||||
use clds::clouds::{
|
||||
monitor_rules::{MonitorRules},
|
||||
};
|
||||
use clds::monitor::run_monitor;
|
||||
use clds::monitor::defs::MonitorRules;
|
||||
use app_auth::AuthStore;
|
||||
use reject_filters::{handle_rejection};
|
||||
use anyhow::{Result};
|
||||
@ -265,7 +262,7 @@ pub async fn run_clouds_monitor() -> Result<()> {
|
||||
//let monitor_sched_task = app_env.config.get_schedtask("monitor");
|
||||
let monitor_rules = MonitorRules::load(&app_env.config.monitor_rules_path,&app_env.config.monitor_rules_file,&app_env.config.monitor_rules_format);
|
||||
if monitor_rules.rules.len() > 0 {
|
||||
run_monitor(monitor_rules,cloud,app_env).await?
|
||||
monitor_rules.run(cloud,app_env).await?
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user