fix: update oldest first

This commit is contained in:
Anna 2022-08-13 18:01:40 -04:00
parent e0683e1036
commit e7cc163ce0
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ pub fn spawn(state: Arc<RwLock<State>>) -> JoinHandle<()> {
async fn inner(state: &RwLock<State>, lodestone: &LodestoneScraper) -> Result<HashMap<u32, Result<()>>> {
let users = sqlx::query!(
// language=sqlite
"select * from users where (julianday(current_timestamp) - julianday(last_updated)) * 24 >= 2",
"select * from users where (julianday(current_timestamp) - julianday(last_updated)) * 24 >= 2 order by last_updated",
)
.fetch_all(&state.read().await.db)
.await