I imported a 20 years old forum to Discourse.
It has many unused or spam accounts and spam messages.
I’d like to do a cleanup.
I set up all my users to trust level 0.
I tried to know how many users have never posted any message with this data explorer query:
SELECT COUNT (DISTINCT user_id) from posts
It counts 28530.
I tried to know how many total users I have:
SELECT COUNT (DISTINCT id) FROM users
It counts 180000 (vBulletin stats said we indeed had 180000 accounts)
I triggered the CleanUpInactiveUsers Sidekiq job.
Only a few hundred users were removed. I looked at one of these unused profiles and saw no activity: no post, no topic… However, Discobot sent them a message after I imported all the users from vBulletin. It was 5 days ago.
So I Discourse settings, I set clean up inactive users after days to 1.
I trigger CleanUpInactiveUsers Sidekiq job again.
I lost about 1000 users.
I still have 178000 users and I know that most of them are empty and unused profiles with no message.
Any idea why they aren’t removed by CleanUpInactiveUsers?
Plus, since there are many spams accounts and messages. Is it possible to trigger spam detection on existing users and messages, and clean all that up too?