Wait before refreshing users not after
This commit is contained in:
parent
b2a9ec9d45
commit
0040dcf6df
1 changed files with 1 additions and 1 deletions
|
@ -65,10 +65,10 @@ async fn main() {
|
||||||
tokio::task::spawn(async {
|
tokio::task::spawn(async {
|
||||||
let mut interval = time::interval(Duration::from_millis(60 * 60 * 1000)); // every hour
|
let mut interval = time::interval(Duration::from_millis(60 * 60 * 1000)); // every hour
|
||||||
loop {
|
loop {
|
||||||
|
interval.tick().await;
|
||||||
if let Err(err) = DATABASE.refresh_users(&HTTP).await {
|
if let Err(err) = DATABASE.refresh_users(&HTTP).await {
|
||||||
error!("{:?}", err);
|
error!("{:?}", err);
|
||||||
}
|
}
|
||||||
interval.tick().await;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
rocket().await.expect("Failed to launch rocket");
|
rocket().await.expect("Failed to launch rocket");
|
||||||
|
|
Loading…
Add table
Reference in a new issue