hard limit enforcement, detect deleted files on load
All checks were successful
build docker container automatically / build (push) Successful in 3m26s
All checks were successful
build docker container automatically / build (push) Successful in 3m26s
This commit is contained in:
@ -72,10 +72,18 @@ pub async fn scheduled_tasks_loop() {
|
||||
|
||||
for task in &mut tasks {
|
||||
let mut first_exec = false;
|
||||
|
||||
if let Some(last_exec) = task.last_exec {
|
||||
if(task.interval == Duration::from_secs(0)) {
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
|
||||
let should_exec = match task.last_exec {
|
||||
Some(time) => SystemTime::now().duration_since(time).expect("how ???") >= task.interval,
|
||||
None => { first_exec = true; true }
|
||||
};
|
||||
|
||||
if should_exec {
|
||||
tracing::info!("running task {}", task.name);
|
||||
(task.f)(first_exec);
|
||||
|
||||
Reference in New Issue
Block a user