fix: print how many tokens were cleaned

This commit is contained in:
əlemi 2023-05-09 02:18:29 +02:00
parent 5268db4833
commit a7a1daaabe
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -27,6 +27,8 @@ pub async fn purge_expired_tokens(db: &DatabaseConnection, lifetime: Duration) -
entities::token::Column::CreatedAt.lt(Utc::now() - lifetime) entities::token::Column::CreatedAt.lt(Utc::now() - lifetime)
).exec(db).await?; ).exec(db).await?;
info!("purged {} tokens", res.rows_affected);
Ok(res.rows_affected) Ok(res.rows_affected)
} }