that loop waits forever

This commit is contained in:
Bryan Stitt 2023-06-27 11:02:12 -07:00
parent 25e5caaab8
commit 46ee5bf277

View File

@ -162,9 +162,21 @@ impl StatBuffer {
}
}
// TODO: don't just sleep. wait for things to actually finish
// TODO: wait on all websockets to close
// TODO: wait on all pending external requests to finish
sleep(Duration::from_secs(10)).await;
// loop {
// // nope. this won't ever be true because we keep making stats for internal requests
// // if stat_receiver.is_disconnected() {
// // info!("stat_receiver is disconnected");
// // break;
// // }
// // TODO: don't just sleep. watch a channel
// sleep(Duration::from_millis(10)).await;
// }
let saved_relational = self.save_relational_stats().await;
info!("saved {} pending relational stat(s)", saved_relational);