mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Reduce the time_read threshold to one minute. (#12159)
* FIX: Reduce the time_read threshold to one minute. Five minutes is too much and could fill the queue with false positives. * Update spec/jobs/enqueue_suspect_users_spec.rb Co-authored-by: Arpit Jalan <arpit@techapj.com> Co-authored-by: Arpit Jalan <arpit@techapj.com>
This commit is contained in:
@@ -90,15 +90,15 @@ describe Jobs::EnqueueSuspectUsers do
|
||||
end
|
||||
|
||||
it 'enqueues a suspect user with not enough time read' do
|
||||
suspect_user.user_stat.update!(posts_read_count: 2, topics_entered: 2, time_read: 1.minute.to_i)
|
||||
suspect_user.user_stat.update!(posts_read_count: 2, topics_entered: 2, time_read: 30.seconds.to_i)
|
||||
|
||||
subject.execute({})
|
||||
|
||||
expect(ReviewableUser.count).to eq(1)
|
||||
end
|
||||
|
||||
it 'ignores users if their time read is higher than five minutes' do
|
||||
suspect_user.user_stat.update!(posts_read_count: 2, topics_entered: 2, time_read: 10.minutes.to_i)
|
||||
it 'ignores users if their time read is higher than one minute' do
|
||||
suspect_user.user_stat.update!(posts_read_count: 2, topics_entered: 2, time_read: 2.minutes.to_i)
|
||||
|
||||
subject.execute({})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user