From a7a1daaabed21cbd1d69de594dde5861479535ba Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 9 May 2023 02:18:29 +0200 Subject: [PATCH] fix: print how many tokens were cleaned --- src/persistence.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/persistence.rs b/src/persistence.rs index 3408770..d063eb1 100644 --- a/src/persistence.rs +++ b/src/persistence.rs @@ -27,6 +27,8 @@ pub async fn purge_expired_tokens(db: &DatabaseConnection, lifetime: Duration) - entities::token::Column::CreatedAt.lt(Utc::now() - lifetime) ).exec(db).await?; + info!("purged {} tokens", res.rows_affected); + Ok(res.rows_affected) }