aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2024-01-01 19:10:43 +0000
committerdiogo464 <[email protected]>2024-01-01 19:10:43 +0000
commite1addb5522d6d5fca29e134992a76901ba1335dc (patch)
tree0405b1790b2c1f2979259fe858c1006f06939c3a /src
parent87564a6266353f5b983024708f7046a472ece3a2 (diff)
added extra logging
Diffstat (limited to 'src')
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 190f258..394c427 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -110,6 +110,11 @@ fn snapshot_mainloop(schedule: cfg::Schedule, datasets: Vec<cfg::Dataset>) {
110 let now = chrono::Utc::now().timestamp(); 110 let now = chrono::Utc::now().timestamp();
111 let next = next_trigger.timestamp(); 111 let next = next_trigger.timestamp();
112 let sleep = next.saturating_sub(now) as u64; 112 let sleep = next.saturating_sub(now) as u64;
113 tracing::debug!(
114 tag = schedule.tag,
115 "sleeping for {} seconds until next trigger",
116 sleep
117 );
113 std::thread::sleep(std::time::Duration::from_secs(sleep)); 118 std::thread::sleep(std::time::Duration::from_secs(sleep));
114 119
115 for dataset in datasets.iter().filter(|d| d.has_tag(&schedule.tag)) { 120 for dataset in datasets.iter().filter(|d| d.has_tag(&schedule.tag)) {