don't immediately run fetcher a second time on startup

main
xenofem 2022-04-16 00:04:41 -04:00
parent 1f7e5ee5ca
commit 774f3195de
1 changed files with 1 additions and 1 deletions

View File

@ -50,10 +50,10 @@ async fn start_updater() -> Result<web::Data<AppState>, Error> {
std::thread::spawn(move || {
actix_web::rt::System::new().block_on(async {
loop {
actix_web::rt::time::sleep(*UPDATE_INTERVAL).await;
if let Err(e) = try_update(&state_copy, &mut fetcher).await {
eprintln!("Error updating data: {:#?}", e);
}
actix_web::rt::time::sleep(*UPDATE_INTERVAL).await;
}
});
});