The discussion revolves around an issue with the auto cleanup of inactive users not functioning as expected on a Discourse site running v2.4.3. netpositive reports that inactive users meeting the criteria (Trust Level 0, no posts in 730 days) are not being removed. GI-Joe notes that users with Trust Level 1 are not being cleaned up, which aligns with the system’s design. tshenry confirms the cleanup job works, citing a recent deletion on Meta, and suggests manually triggering the Jobs::CleanUpInactiveUsers job via the Sidekiq scheduler if needed. netpositive confirms the job does work, as some users were deleted, indicating the issue is on their end. tshenry also suggests using the Rails console for user management and clarifies the trust level limitations. KKavoussanakis adds that even users with recent activity (like last seen or emailed) are being deleted when the cleanup period is reduced to 365 days on a newer version (2.8.0.beta10), highlighting potential edge cases.
It looks like we had an inactive user deleted 11 hours ago based on Meta’s Staff Action Logs (Sidekiq is also showing that was when the clean up job was last run), so that’s looking good to me:
@netpositive I don’t see any recent commits that are specific to this feature, but it certainly wouldn’t hurt to update your site. If that’s not possible, you could try manually triggering the job. It should be Jobs::CleanUpInactiveUsers which you can find at /sidekiq/scheduler
@tshenry Thank You for the useful hints! It looks like the cleanup job deleted some inactive users yesterday morning so it definitely works The problem is somewhere on our part. Is there a tool for easier user management I’m not aware of?
@GI-Joe Yeah, I wish it was working for higher levels too
Possibly. The rails console is a very powerful tool that you can use, but it’s not for the faint of heart. If you haven’t ever used it and want to start, I would recommend setting up a testing site where you can experiment and get to know how it works. The inactive users job is defined here. You could grab/modify what you need from that.
Just noting that the only other trust level it could apply to is TL1 since TL2 has a “Replied to at least 3 different topics” requirement.