chore (backend-rs): add comment

This commit is contained in:
naskya 2024-07-11 02:54:46 +09:00
parent 85a1db7981
commit 1c8308cc32
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -35,6 +35,9 @@ async fn statistics() -> Result<(u64, u64, u64, u64), DbErr> {
const HALF_YEAR: chrono::TimeDelta = chrono::Duration::days(183);
let local_users = misc::user::count::local_total(db);
// We don't need to care about the number of system actors here,
// because their last active date is null
let local_active_halfyear = user::Entity::find()
.filter(user::Column::Host.is_null())
.filter(user::Column::LastActiveDate.gt(now - HALF_YEAR))