summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge_watchdog
diff options
context:
space:
mode:
authorAlbin Suresh <albin.suresh@softwareag.com>2022-05-25 18:48:52 +0530
committerAlbin Suresh <albin.suresh@softwareag.com>2022-05-26 16:42:45 +0530
commite3775e430d3109081d3926ab4e7b13b05e1c2741 (patch)
tree1e25522055a7e502b4b6dafd1ee6d441dd413912 /crates/core/tedge_watchdog
parent7f75af001342075a102460a3e3f5792411ed3ec3 (diff)
Fix tedge watchdog timeout misalignment with monitored services
Diffstat (limited to 'crates/core/tedge_watchdog')
-rw-r--r--crates/core/tedge_watchdog/src/systemd_watchdog.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/core/tedge_watchdog/src/systemd_watchdog.rs b/crates/core/tedge_watchdog/src/systemd_watchdog.rs
index 77825103..3fec6840 100644
--- a/crates/core/tedge_watchdog/src/systemd_watchdog.rs
+++ b/crates/core/tedge_watchdog/src/systemd_watchdog.rs
@@ -14,7 +14,7 @@ use tedge_config::{
ConfigRepository, ConfigSettingAccessor, MqttBindAddressSetting, MqttPortSetting,
TEdgeConfigLocation,
};
-use tracing::{error, info, warn};
+use tracing::{debug, error, info, warn};
#[derive(Serialize, Deserialize)]
pub struct HealthStatus {
@@ -49,7 +49,7 @@ pub async fn start_watchdog(tedge_config_dir: PathBuf) -> Result<(), anyhow::Err
service,
&req_topic,
&res_topic,
- interval / 2,
+ interval / 4,
)
.await
}));
@@ -98,6 +98,7 @@ async fn monitor_tedge_service(
let p: HealthStatus = serde_json::from_str(message)?;
+ debug!("Sending notification for {} with pid: {}", name, p.pid);
notify_systemd(p.pid, "WATCHDOG=1")?;
}
Ok(None) => {}