Auto cleanup of inactive users is not working

Hello,

we have a lot of inactive users who should be removed now. I’ve checked the logs but nothing suspicious showed up.

We’re on v2.4.3, setting on default 730 days.

How can I fix this problem or at least manually start the cleanup job?

Thanks a lot!

1 个赞

Hello @netpositive

Are the requirements met for those inactive users?

They need to be trust level 0 and have no posts in the last 730 days.

We’re having a similar problem, but it’s due to having inactive users who are in Trust Level 1.

4 个赞

Yep, we have users who meet both requirements and their accounts still exist.

2 个赞

Can we repro this here on meta @tshenry ?

2 个赞

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

Please keep us posted on how things go.

5 个赞

@tshenry Thank You for the useful hints! It looks like the cleanup job deleted some inactive users yesterday morning so it definitely works :relieved: 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 :thinking:

3 个赞

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.

3 个赞

您好,

我们昨天已将设置从 730 更改为 365。昨天删除的所有用户都至少登录过一次。
请考虑用户日志中的这个示例:

created_at last_seen_at last_posted_at last_emailed_at trust_level
2020-05-08 14:44:07 UTC 2020-05-21 10:50:59 UTC 0

(他们被创建过一次,发送过一次邮件;他们所有其他统计数据均为零)。
我们使用的是 2.8.0.beta10 版本。