mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
penalize api calls in special sauce
This commit is contained in:
parent
b75116d13c
commit
064e919490
1 changed files with 1 additions and 0 deletions
|
@ -1094,6 +1094,7 @@ class Site < Sequel::Model
|
||||||
|
|
||||||
# penalties
|
# penalties
|
||||||
points = 0 if changed_count < 2
|
points = 0 if changed_count < 2
|
||||||
|
points = 0 if api_calls > 1000
|
||||||
|
|
||||||
(points / ((Time.now - updated_at) / 7.days)**SCORE_GRAVITY).round(4)
|
(points / ((Time.now - updated_at) / 7.days)**SCORE_GRAVITY).round(4)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue