Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions ee/tabby-webserver/src/service/background_job/helper/cron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ where
match next {
Some(next) => {
let to_sleep = next.clone() - timezone.from_utc_datetime(&Utc::now().naive_utc());
if to_sleep.num_seconds() < 0 {
// If the next time is in the past, skip it and get the next one.
continue
}
let to_sleep = match to_sleep.to_std() {
Ok(to_sleep) => to_sleep,
Err(err) => {
warn!("Failed to convert to std duration: {}", err);
Err(_) => {
// If the next time is in the past or conversion fails, skip it and get the next one.
continue;
}
};
Expand Down