Compare commits
No commits in common. "03073965a15692769dfbc08ec2d070395b83746b" and "6d4bc81720893cb933583083a6e09e8f45bff9c1" have entirely different histories.
03073965a1
...
6d4bc81720
@ -3,7 +3,7 @@ mod waterlevel;
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use job_scheduler_ng::{Job, JobScheduler};
|
use job_scheduler_ng::{Job, JobScheduler};
|
||||||
use rocket::tokio::{self, task, time};
|
use rocket::tokio::{self, task};
|
||||||
use sqlx::SqlitePool;
|
use sqlx::SqlitePool;
|
||||||
|
|
||||||
pub fn schedule(db: &SqlitePool) {
|
pub fn schedule(db: &SqlitePool) {
|
||||||
@ -26,10 +26,9 @@ pub fn schedule(db: &SqlitePool) {
|
|||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let mut interval = time::interval(Duration::from_secs(60));
|
|
||||||
loop {
|
loop {
|
||||||
sched.tick();
|
sched.tick();
|
||||||
interval.tick().await;
|
std::thread::sleep(Duration::from_secs(60));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user