refactor config
This commit is contained in:
@@ -5,14 +5,13 @@ use async_trait::async_trait;
|
||||
use chrony_candm::reply::{self, ReplyBody, SourceMode};
|
||||
use chrony_candm::request::{self, RequestBody};
|
||||
use chrony_candm::{ClientOptions, blocking_query};
|
||||
use futures::future::join;
|
||||
use tokio::{join, select};
|
||||
use tokio::select;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tracing::{info, warn};
|
||||
|
||||
use crate::{
|
||||
ChimemonSource, ChimemonSourceChannel, ChronyConfig, MetricTags, SourceMetric, SourceReport,
|
||||
SourceReportDetails, SourceStatus,
|
||||
ChimemonSource, ChimemonSourceChannel, MetricTags, SourceMetric, SourceReport,
|
||||
SourceReportDetails, SourceStatus, config::ChronyConfig,
|
||||
};
|
||||
|
||||
pub struct ChronyClient {
|
||||
@@ -313,7 +312,7 @@ impl ChimemonSource for ChronyClient {
|
||||
match self.tracking_poll(&chan).await {
|
||||
Ok(_) => (),
|
||||
Err(e) => {
|
||||
warn!("Error in chrony task: {}", e.to_string());
|
||||
warn!(error = ?e, "Error in chrony tracking task");
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -321,7 +320,7 @@ impl ChimemonSource for ChronyClient {
|
||||
match self.sources_poll(&chan).await {
|
||||
Ok(_) => (),
|
||||
Err(e) => {
|
||||
warn!("Error in chrony task: {}", e.to_string());
|
||||
warn!(error = ?e, "Error in chrony sources task");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user