Skip to content

Commit 869c90e

Browse files
committed
fix: log schedule
Signed-off-by: Anton Whalley <[email protected]>
1 parent d79266e commit 869c90e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

core-dump-agent/src/main.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,16 @@ async fn main() -> Result<(), anyhow::Error> {
186186
}
187187
};
188188

189-
let s_job = match Job::new_async(schedule.as_str(), move |_uuid, _l| {
189+
let s_job = match Job::new_async(schedule.as_str(), move |uuid, mut l| {
190190
Box::pin(async move {
191-
run_polling_agent().await;
191+
let next_tick = l.next_tick_for_job(uuid).await;
192+
match next_tick {
193+
Ok(Some(ts)) => {
194+
info!("Next scheduled run {:?}", ts);
195+
run_polling_agent().await;
196+
}
197+
_ => warn!("Could not get next tick for job"),
198+
}
192199
})
193200
}) {
194201
Ok(v) => v,

0 commit comments

Comments
 (0)