mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
improvements to jerk detector
This commit is contained in:
parent
ca288fcd8b
commit
5a936a599c
1 changed files with 6 additions and 2 deletions
|
@ -628,8 +628,12 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def is_a_jerk?
|
||||
blocks_dataset_count = blocks_dataset.count
|
||||
blocks_dataset_count >= BLOCK_JERK_THRESHOLD && ((blocks_dataset_count / follows_dataset.count.to_f) * 100) > BLOCK_JERK_PERCENTAGE
|
||||
blocks_count = blocks_dataset.count
|
||||
blockings_count = blockings_dataset.count
|
||||
follows_count = follows_dataset.count
|
||||
return true if blocks_count > BLOCK_JERK_THRESHOLD * 2
|
||||
return true if blockings_count > BLOCK_JERK_THRESHOLD * 4
|
||||
blocks_count >= BLOCK_JERK_THRESHOLD && ((blocks_count / follows_count.to_f) * 100) > BLOCK_JERK_PERCENTAGE && blocks_count > 60
|
||||
end
|
||||
|
||||
def blocking_site_ids
|
||||
|
|
Loading…
Add table
Reference in a new issue