Skip to content

Commit

Permalink
fix: log schedule
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Whalley <anton@venshare.com>
  • Loading branch information
No9 committed Dec 22, 2022
1 parent d79266e commit 869c90e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core-dump-agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,16 @@ async fn main() -> Result<(), anyhow::Error> {
}
};

let s_job = match Job::new_async(schedule.as_str(), move |_uuid, _l| {
let s_job = match Job::new_async(schedule.as_str(), move |uuid, mut l| {
Box::pin(async move {
run_polling_agent().await;
let next_tick = l.next_tick_for_job(uuid).await;
match next_tick {
Ok(Some(ts)) => {
info!("Next scheduled run {:?}", ts);
run_polling_agent().await;
}
_ => warn!("Could not get next tick for job"),
}
})
}) {
Ok(v) => v,
Expand Down

0 comments on commit 869c90e

Please sign in to comment.