parse series info with missig fields

This commit is contained in:
euzu
2024-12-28 20:01:28 +01:00
parent 6280a252d7
commit 47f18ed867
7 changed files with 59 additions and 30 deletions
+3 -1
View File
@@ -533,7 +533,9 @@ pub async fn exec_processing(cfg: Arc<Config>, targets: Arc<ProcessTargets>) {
let start_time = Instant::now();
let (stats, errors) = process_sources(cfg.clone(), targets.clone()).await;
// log errors
errors.iter().for_each(|err| error!("{}", err.message));
for err in &errors {
error!("{}", err.message);
}
if let Ok(stats_msg) = serde_json::to_string(&serde_json::Value::Object(serde_json::map::Map::from_iter([("stats".to_string(), serde_json::to_value(stats).unwrap())]))) {
// print stats
info!("{}", stats_msg);